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

example: fix example error #54599

Merged
merged 6 commits into from Sep 14, 2023
Merged

example: fix example error #54599

merged 6 commits into from Sep 14, 2023

Conversation

li-jia-nan
Copy link
Contributor

example: fix example error

@li-jia-nan li-jia-nan requested review from a team as code owners August 26, 2023 14:31
@ijjk ijjk added the examples Issue/PR related to examples label Aug 26, 2023
@ijjk
Copy link
Member

ijjk commented Aug 26, 2023

Allow CI Workflow Run

  • approve CI run for commit: bb5d75f

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain what's the error being addressed here?

I see you opened this on the Ant Design repo too, but there was no reasoning: ant-design/ant-design#44440

@li-jia-nan
Copy link
Contributor Author

Could you explain what's the error being addressed here?

I see you opened this on the Ant Design repo too, but there was no reasoning: ant-design/ant-design#44440

Hello, The client's cache should not be recreated

@li-jia-nan
Copy link
Contributor Author

image

@li-jia-nan
Copy link
Contributor Author

@balazsorban44 @leerob @huozhi @timneutkens @styfle Can someone review this for me? thank you

styfle
styfle previously approved these changes Sep 14, 2023
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @balazsorban44

This PR doesn't explain what the bug is or why this PR would fix it.

Furthermore, I can't find any documentation on this function besides https://ant-design.github.io/cssinjs#createcache

image

So asking for a review here is nearly impossible.

That said, since ant-design/ant-design#44440 was merged upstream then perhaps we should merge this too.

@li-jia-nan
Copy link
Contributor Author

@styfle I'm sorry that I didn't explain the reason. My English is not good. In some special scenarios, the cache changes, leading to unexpected situations. For example, when the layout switches pages, the cache is not uninstalled, but the cache is re-created. , resulting in a miss when obtaining the component's style cache. To sum up, the cache should only be created once.

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Looks like we can't merge because lint is failing

warning  React Hook React.useMemo has an unnecessary dependency: 'createCache'. Either exclude it or remove the dependency array. Outer scope values like 'createCache' aren't valid dependencies because mutating them doesn't re-render the component  react-hooks/exhaustive-deps

@li-jia-nan
Copy link
Contributor Author

I have removed unnecessary dependencies, please check again, thank you

@styfle styfle added the CI approved Approve running CI for fork label Sep 14, 2023
@styfle styfle dismissed balazsorban44’s stale review September 14, 2023 19:08

A description was added

@styfle styfle merged commit cb5e75d into vercel:canary Sep 14, 2023
66 checks passed
@li-jia-nan li-jia-nan deleted the antd branch September 14, 2023 19:09
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI approved Approve running CI for fork examples Issue/PR related to examples locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants