Skip to content

Fix useCallback not work properly in shallow renderer#15843

Closed
chenesan wants to merge 3 commits into
react:masterfrom
chenesan:usecallback-not-work-properly-in-shallow-renderer
Closed

Fix useCallback not work properly in shallow renderer#15843
chenesan wants to merge 3 commits into
react:masterfrom
chenesan:usecallback-not-work-properly-in-shallow-renderer

Conversation

@chenesan

@chenesan chenesan commented Jun 8, 2019

Copy link
Copy Markdown
Contributor

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

sizebot commented Jun 8, 2019

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@threepointone

Copy link
Copy Markdown
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

ljharb commented Sep 4, 2019

Copy link
Copy Markdown
Contributor

@threepointone why not?

@threepointone

Copy link
Copy Markdown
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

stale Bot commented Jan 10, 2020

Copy link
Copy Markdown

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

ljharb commented Jan 10, 2020

Copy link
Copy Markdown
Contributor

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

gaearon commented Mar 18, 2020

Copy link
Copy Markdown
Collaborator

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