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 useCallback not work properly in shallow renderer #15843

Conversation

chenesan
Copy link
Contributor

@chenesan chenesan commented Jun 8, 2019

Fix #15774 .
Just copy and paste the same logic as useMemo in shallow renderer; Not sure if it's better to extract the comparison logic into common function or just keep it repeat.

@sizebot
Copy link

sizebot commented Jun 8, 2019

Details of bundled changes.

Comparing: 3b23022...b067a9f

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js 0.0% -0.0% 530.77 KB 530.77 KB 113.62 KB 113.61 KB UMD_DEV
ReactShallowRenderer-dev.js +1.9% +0.2% 34.79 KB 35.43 KB 8.74 KB 8.76 KB FB_WWW_DEV
react-test-renderer.development.js 0.0% -0.0% 526.31 KB 526.31 KB 112.5 KB 112.5 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 62.91 KB 62.91 KB 19.32 KB 19.32 KB NODE_PROD
react-test-renderer-shallow.development.js +1.5% +0.1% 41.84 KB 42.47 KB 10.82 KB 10.84 KB UMD_DEV
react-test-renderer-shallow.production.min.js 🔺+2.6% -0.1% 11.6 KB 11.9 KB 3.55 KB 3.54 KB UMD_PROD
react-test-renderer-shallow.development.js +1.7% +0.1% 35.98 KB 36.6 KB 9.45 KB 9.46 KB NODE_DEV
react-test-renderer-shallow.production.min.js 🔺+2.6% -0.0% 11.74 KB 12.05 KB 3.67 KB 3.67 KB NODE_PROD

Generated by 🚫 dangerJS

@chenesan
Copy link
Contributor Author

@threepointone @gaearon sorry for pinging. any news on this?

@threepointone
Copy link
Contributor

I don't think we're going to add this functionality to the shallow renderer for now, sorry. I truly appreciate the effort.

@ljharb
Copy link
Contributor

ljharb commented Sep 4, 2019

@threepointone why not?

@threepointone
Copy link
Contributor

Sorry, I think I read the conclusion on the linked task wrongly. I'll reopen this, but I'm still not certain what our plans are for adding this to the shallow renderer.

@threepointone threepointone reopened this Sep 4, 2019
@stale
Copy link

stale bot commented Jan 10, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 10, 2020
@ljharb
Copy link
Contributor

ljharb commented Jan 10, 2020

This isn't stale, it's just that collaborators haven't made a decision yet.

(Please don't use stalebots, they're incredibly user-hostile)

@stale stale bot removed the Resolution: Stale Automatically closed due to inactivity label Jan 10, 2020
@gaearon
Copy link
Collaborator

gaearon commented Mar 18, 2020

The shallow renderer has moved to https://github.com/NMinhNguyen/react-shallow-renderer. If this is still relevant, please feel free to file this issue there. Thanks!

@gaearon gaearon closed this Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useCallback doesn't memoize callback in shallow renderer
7 participants