callbacks do not change across renders
See original GitHub issueHi there,
I might be missing something obvious, but can I access render props from getters/renderers? My dataGetter
cellRenderer
don’t seem to update, even if they’re declared as anonymous functions, and see the same initial props at each subsequent render. Intended?
f
Issue Analytics
- State:
- Created 4 years ago
- Comments:21
Top Results From Across the Web
React component not rendering after state change from callback
If the state is changed from within the page, everything is fine. When the state is updated via the callback from the child...
Read more >Avoiding Accidental Re-Renders with the useCallback Hook
Because the functions are re-created on every single render, the reference to that function changes. And each time it changes when it's used...
Read more >5 Ways to Avoid React Component Re-Renderings
In the above example, useCallBack() memoizes the onClick callback. So, it will not re-render the component if the user clicks the same item...
Read more >React re-renders guide: everything, all at once - Developer way
When a component's state changes, it will re-render itself. Usually, it happens either in a callback or in useEffect hook. State changes are...
Read more >React.Component
The render() method is the only required method in a class component. ... The render() function should be pure, meaning that it does...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sklinov https://github.com/Autodesk/react-base-table#closure-problem-in-custom-renderers
Hi, @nihgwu ! I think I’m facing the same issue when I’m trying to pass some async stuff to
cellRenderer
and it looks likeBaseTable
is using the first closure of it. https://codesandbox.io/s/react-base-table-async-js0to?file=/src/App.tsxCan you help with any universal workaround for it until the next major release?