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

Support React.memo #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Support React.memo #19

wants to merge 2 commits into from

Conversation

novemberborn
Copy link
Member

Detect memoized elements & dereference their underlying type. Format such elements with a different annotation, similar to function types. Retain backwards compatibility with elements serialized before React.memo support was added.

Fixes #16.

Detect memoized elements & dereference their underlying type. Format
such elements with a different annotation, similar to function types.
Retain backwards compatibility with elements serialized before
React.memo support was added.
@sindresorhus
Copy link
Member

// @billyjanitsch

@nodaguti
Copy link

@billyjanitsch @novemberborn
Hi, is there any chance to get this PR merged in the near future?

#16 is still preventing us from performing snapshot testing of memoised components with react-test-renderer and AVA...

Thank you.

@novemberborn
Copy link
Member Author

Hi, is there any chance to get this PR merged in the near future?

I haven't looked at these libraries in a long time now… will have to remember the impact that making changes here may have on AVA. Plus do some general maintenance. Maybe I'll have some time this weekend.

@novemberborn
Copy link
Member Author

@nodaguti if I recall, this is a breaking change. I don't really have the time to deal with that. So instead, avajs/ava#2428 proposes to make this configurable. The @ava/react package can then pull in a newer version of this plugin.

I'll let you know when there's something to test 😄

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

Successfully merging this pull request may close these issues.

Support React.memo
4 participants