-
Notifications
You must be signed in to change notification settings - Fork 68
CPLAT-8042 Implement/Expose useLayoutEffect Hook #248
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
CPLAT-8042 Implement/Expose useLayoutEffect Hook #248
Conversation
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.
Everything looks really good to me! One tiny nit, but otherwise +1!
@@ -183,6 +184,47 @@ UseRefTestComponent(Map props) { | |||
]); | |||
} | |||
|
|||
final random = new Random(); |
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.
#nit no more new
keyword!
final random = new Random(); | |
final random = Random(); |
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.
+10, just one question
return React.useEffect(wrappedSideEffect, dependencies); | ||
} else { | ||
return React.useEffect(wrappedSideEffect); | ||
} |
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.
I assume these changes mean passing in null
for dependencies is the same as not passing it?
# Conflicts: # example/test/function_component_test.dart # lib/hooks.dart # lib/react_client/react_interop.dart # test/hooks_test.dart
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.
+10, will merge pending passing CI
Motivation
Support useLayoutEffect hook in
react-dart
.Changes
useLayoutEffect
function.Please review: @greglittlefield-wf @aaronlademann-wf @joebingham-wk