40
loading...
This website collects cookies to deliver better user experience
The purpose is to develop some ideas in order to provoke a thinking for readers and for myself.
Happy reading.
const [text, setText] = useState('')
// setText is a setter.
This point of view is theoretical. I didn't measure performance and demonstrate performance problem with React Context. It could be a purpose for a next article why not. 🤷
Also, it's possible to use React Memo with React Context to avoid useless rerendering but it could be exhausting to use than Redux don't you think? 🤷
There is no need anymore to use global state to store http response data. For this, there exists library to fetch, cache and update data. React Query is great for that. Or Apollo client for Graphql http requests.