IssueRaiser

React hooks support checklist

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](https://reactjs.org/docs/hooks-reference.html). 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). - [x] useState (#1938, #1996, Test case PR #2008 #2029 #2041) - [x] useEffect (Test case PR #2034 #2041 ; Currently not work in shallow renderer, see facebook/react#15275) - [x] useContext (Test case PR #2041) - [x] useReducer (Test case PR #2041) - [x] useCallback (Test case PR #2148) - [x] useMemo (Test case PR #2144) - [x] useRef (#1938, Test case PR #2162) - [x] useImperativeHandle (#2039, Test case PR #2162) - [x] useLayoutEffect (Test case PR #2121) - [x] useDebugValue(Test case PR #2162) - [x] custom hooks (#1996) known issues (some are resolved with newer version of react): - [x] `setState` returned from `useState` not works with `shallow` before react@16.8.5 . Fixed in https://github.com/facebook/react/pull/15120 . - [ ] `useEffect` and `useLayoutEffect` not works with `shallow` because react shallow renderer doesn't run it. (facebook/react#15275) - [ ] `useCallback` doesn't memoize callback in react shallow renderer (https://github.com/facebook/react/issues/15774) Currently I'm working in `useState` (#2008) and I'm glad to see if an

Posted by chenesan on Feb 8, 2019, 1:31 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments

support (Software)

React hooks support checklist

chenesanFeb 8, 2019, 1:31 AM

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](https://reactjs.org/docs/hooks-reference.html). 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). - [x] useState (#1938, #1996, Test case PR #2008 #2029 #2041) - [x] useEffect (Test case PR #2034 #2041 ; Currently not work in shallow renderer, see facebook/react#15275) - [x] useContext (Test case PR #2041) - [x] useReducer (Test case PR #2041) - [x] useCallback (Test case PR #2148) - [x] useMemo (Test case PR #2144) - [x] useRef (#1938, Test case PR #2162) - [x] useImperativeHandle (#2039, Test case PR #2162) - [x] useLayoutEffect (Test case PR #2121) - [x] useDebugValue(Test case PR #2162) - [x] custom hooks (#1996) known issues (some are resolved with newer version of react): - [x] `setState` returned from `useState` not works with `shallow` before react@16.8.5 . Fixed in https://github.com/facebook/react/pull/15120 . - [ ] `useEffect` and `useLayoutEffect` not works with `shallow` because react shallow renderer doesn't run it. (facebook/react#15275) - [ ] `useCallback` doesn't memoize callback in react shallow renderer (https://github.com/facebook/react/issues/15774) Currently I'm working in `useState` (#2008) and I'm glad to see if an

Comments (0)

No comments yet. Start the discussion.

Comment on this issue