Sorry for removing issue template. Since the React 16.8 is out we can start to work on hooks support in enzyme now. Previously I tried to open PR in #2008 to help with this but found out that there are too many apis in React hooks. After some thinking I feel it's better to track all of the supports / PR in one issues, and create one PR for each hooks api (useState
, useEffect
, etc).
known issues (some are resolved with newer version of react):
setState
returned from useState
not works with shallow
before react@16.8.5 . Fixed in [Shallow] Implement setState for Hooks and remount on type change facebook/react#15120 .useEffect
and useLayoutEffect
not works with shallow
because react shallow renderer doesn't run it. ( Add option in shallow renderer to run effects/componentDidUpdate/componentDidMount facebook/react#15275)useCallback
doesn't memoize callback in react shallow renderer ( useCallback doesn't memoize callback in shallow renderer facebook/react#15774)Currently I'm working in useState
(#2008) and I'm glad to see if anyone else would like to help to support other apis. For now we need to add many tests to make sure what is working in enzyme, and what is not, then add patch / feature into it. I can help to maintain the above checklist if there are any related issues / PR .
I'm simply volunteer to do this and not a main maintainer here though so @ljharb if you have had any plan / schedule on this feel free to tell me and I can change or close this :-)
vsubbotskyy, skeithyip, raviqqe, LexSwed, helabenkhalfallah and 333 morefabiodamasceno, daitonaaa, heng1025, nnk1996, nabs-grg and 5 moredvakatsiienko, TCezarRod, himynameisdave, derekdowling, bodjay and 49 moredvakatsiienko, himynameisdave, kuzhelov, derekdowling, njetsy and 57 moredvakatsiienko, amkreativ, TCezarRod, klaytonfaria, himynameisdave and 43 morealbertcito, gkhorguani, hally9k, cosminmindru, derek-rmd and 39 more
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4