score:3
Accepted answer
Going to provide the answer, but if Mike Peyper posts I will mark his as the solution since he gave it to me on https://github.com/mpeyper/react-hooks-testing-library/issues/75.
To quote:
This wont work as expected as only the first argument is passed through to the hook callback. Usually you would pass an object with multiple keys and destructure it in the callback:
const { rerender } = renderHook(({ a, b, c }) => useSomeHook(a, b, c))
rerender({ a, b, c})
The reason for this is it's supposed to mimic the props of the wrapping component.
Source: stackoverflow.com
Related Query
- Why is re-run only updating props one time with react-hooks-testing-libary?
- how to run my node application and react app in the same time with one command?
- React Hooks: useState with onClick only updating the SECOND time button is clicked?
- React - Navigation dropdown with only one dropdown showing at the time
- React Hooks & UseEffect not updating display with socketIO data. Only renders elements in array
- How to show only one active item at a time with react and material ui
- Implement shouldComponentUpdate with React hooks - Render child only once, but make DOM changes when props change
- Only show Popup one time with React (local storage)
- React Hooks: useState with onClick only updating after the 2nd time button is clicked?
- Why only first time React function component getting props
- Only one form submitting correctly with react hooks
- Why is my websocket listener only firing one time when declared in useEffect with empty array as the second argument?
- How to pass props from one component to another along with props validation - React Hooks
- Testing React Functional Component with Hooks using Jest
- Updating state with props on React child component
- Accessing the State of a Functional Component with React Hooks when Testing with Enzyme
- React useEffect() only run on first render with dependencies
- React hooks useState not updating with onChange
- Why is my react component not updating with state updates?
- Why I am getting this error message when I run react js project first time in my system?
- React hooks useState setValue still rerender one more time when value is equal
- Props not updating when redux state change in React Hooks
- Using one webpack project inside another with react hooks causes an error
- Avoid rerendering every component in list while updating only one in React
- react props not updating with redux store
- Highlighting one object at a time with React
- React antd expandedRowRender - Only open one row at a time
- why filtering state array with react hooks doesn't work but filtering original array does
- How to keep only one radio button selected with React
- React get props from Router with React Hooks
More Query from same tag
- i18next plurals using count returned an object instead of string
- How to pass variable in index.html to react components
- Next.js Dynamic URL with _error
- Is it impossible to cancel the transaction when my server is on error
- Map array of object to create new array
- How to map an array after making changes to it in react js?
- How to update cart quantity if item already exist in Cart - reactjs?
- Why is React not rendering my component state correctly?
- Onclose of a modal, how to get focus back to the interactive element clicked on? React Js
- Mysterious ESLint Parsing Error
- React ES6 Arrow in Map Throws Syntax Error
- Jest and file-loader import
- react: onClick - get only the clicked element, not the children
- How do I merge 2 properties of 1 JSON file if the key name is the same?
- How Change Background Color & Blur mui5 modal?
- Table generates twice while only being called once
- Multiple Queries using Apollo Client and React
- Updating 'state' dynamically in React overwrites entire state
- How to test state that has been lifted up from child to parent component in React?
- Google Translate Widget Has Problem with Loading
- React Native: View Config not found for name RNCWebView
- Not Redirection on a component that contains id parameter on Production React js
- Module parse failed: Unexpected token (7:5) You may need an appropriate loader to handle this file type
- react 'componentWillReceiveProps' use
- How to display a common component for all routes in react
- how to propagate context to Router component. Reactjs
- Prettier, eslint - classProperties parser plugin error
- Problems tying onChange function to checkbox
- MUI React SSR issues
- React: Data from API not displaying on page after first click