-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add useControlledState hook #1276
Conversation
Playwright Test Component is ready. |
|
||
import {useControlledState} from './useControlledState'; | ||
|
||
describe('useControlledState tests', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"tests" word is redundant I guess
const wasControlled = isControlledRef.current; | ||
if (wasControlled !== isControlled) { | ||
console.warn( | ||
`WARN: A component changed from ${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use console.error
for better visibility. Also let's use the following format: [useControlledState] <message>
Preview is ready. |
18c9c90
to
78ab8ad
Compare
No description provided.