-
Notifications
You must be signed in to change notification settings - Fork 585
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
Fix hook usage #66
Fix hook usage #66
Conversation
@@ -164,7 +164,7 @@ export function ListItem({ | |||
); | |||
|
|||
if (LinkWrapper) { | |||
const StyledLinkWrapper = useMemo(() => buildStyledLinkWrapper(LinkWrapper), [LinkWrapper]); | |||
const StyledLinkWrapper = buildStyledLinkWrapper(LinkWrapper); |
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.
There is another usage similar to this:
design-system/src/components/Button.js
Line 335 in a46acaa
const StyledButtonWrapper = React.useMemo(() => applyStyle(ButtonWrapper), [ButtonWrapper]); |
Do you think it needs updating as well?
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 asked on Discord if any consumers are using SSR. It seems like no usage of useMemo
is working in a Next.js application. I'm gonna see how it all goes in a CRA environment today.
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.
For tracking purposes, just posting this review until we can verify that there are no issues w/ Next & CRA
re: #66 (comment)
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.
Just did some testing here and I'm not seeing any issues so let's get this merged (finally 😄). Thanks @kylemh
🚀 PR was released in v1.1.0 🚀 |
No description provided.