Skip to content
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

Merged
merged 2 commits into from
Sep 13, 2019
Merged

Fix hook usage #66

merged 2 commits into from
Sep 13, 2019

Conversation

kylemh
Copy link
Member

@kylemh kylemh commented Aug 8, 2019

No description provided.

@@ -164,7 +164,7 @@ export function ListItem({
);

if (LinkWrapper) {
const StyledLinkWrapper = useMemo(() => buildStyledLinkWrapper(LinkWrapper), [LinkWrapper]);
const StyledLinkWrapper = buildStyledLinkWrapper(LinkWrapper);
Copy link
Collaborator

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:

const StyledButtonWrapper = React.useMemo(() => applyStyle(ButtonWrapper), [ButtonWrapper]);

Do you think it needs updating as well?

Copy link
Member Author

@kylemh kylemh Aug 8, 2019

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.

Copy link
Collaborator

@kylesuss kylesuss left a 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)

Copy link
Collaborator

@kylesuss kylesuss left a 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

@kylesuss kylesuss merged commit 87628c0 into master Sep 13, 2019
@kylesuss kylesuss deleted the fix-hook-usage branch September 13, 2019 20:29
@kylesuss
Copy link
Collaborator

kylesuss commented Oct 7, 2019

🚀 PR was released in v1.1.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants