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

[PROPOSAL]A new render api tree using react-test-renderer #1059

Closed
koba04 opened this issue Aug 4, 2017 · 3 comments
Closed

[PROPOSAL]A new render api tree using react-test-renderer #1059

koba04 opened this issue Aug 4, 2017 · 3 comments

Comments

@koba04
Copy link
Contributor

koba04 commented Aug 4, 2017

Enzyme has shallow render API as not depending on DOM, which is based on shallow renderer.
Shallow renderer has some limitations, which means it doesn't support refs and componentDid〜 lifecycle methods.
(Enzyme supports componentDid〜 lifecycle methods with some hacks)

React provides react-test-renderer, which supports refs for composite components and all lifecycle methods.
(refs for DOM returns null)

I think it's a good option for testing components without DOM even though react-test-render may not work with old versions(< 0.14) of React.

Also react-test-renderer is based on FiberReconciler, which means the renderer might be able to support many features Fiber provides.
What do you think?

Thanks.

@koba04
Copy link
Contributor Author

koba04 commented Aug 4, 2017

I found a similar issue #249

@ljharb
Copy link
Member

ljharb commented Aug 4, 2017

See #1007.

@ljharb
Copy link
Member

ljharb commented Sep 1, 2018

Closing in favor of #249.

@ljharb ljharb closed this as completed Sep 1, 2018
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

No branches or pull requests

2 participants