Inside your useEffect you are logging list
:
console.log(list);
So you either need to remove the above line, or add list
to the useEffect dependencies at the end.
so change this line
}, [term]);
to
}, [term, list]);
More Related Contents:
- How to fix missing dependency warning when using useEffect React Hook
- How to use `setState` callback on react hooks
- How to use callback with useState hook in react [duplicate]
- Understanding the React Hooks ‘exhaustive-deps’ lint rule
- In useEffect, what’s the difference between providing no dependency array and an empty one?
- With useEffect, how can I skip applying an effect upon the initial render?
- How to use throttle or debounce with React Hook?
- React useReducer async data fetch
- Cannot read property ‘history’ of undefined (useHistory hook of React Router 5)
- How to sync props to state using React hooks : setState()
- useNavigate() may be used only in the context of a component
- Testing React components that fetches data using Hooks
- React Hooks: useEffect() is called twice even if an empty array is used as an argument
- Why React useState with functional update form is needed?
- React.useState does not reload state from props
- React Hook “useState” is called in function “app” which is neither a React function component or a custom React Hook function
- React: useState or useRef?
- How do react hooks determine the component that they are for?
- useReducer Action dispatched twice
- React Hooks – Modified state not reflecting immediately
- Attempted import error: ‘useHistory’ is not exported from ‘react-router-dom’
- React Hooks – How do I implement shouldComponentUpdate?
- React hook rendering an extra time
- Field Array in React using formik
- How to test a react component that is dependent on useContext hook?
- What is the expected return of `useEffect` used for?
- ReactJS – prevState in the new useState React hook?
- Put A Warning If Page Refresh in ReactJS
- React – Is useState ‘s setter function able to change?
- Which react hook to use with firestore onsnapshot?