You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On several occasions I've run into issues where React is not reconciling functions as children when props change. This is hard to reproduce in an arbitrary example, but usually found deep in a project.
There have been several potentially related issues on the React project, with core devs usually mentioning that quite a bit of extra work is done in React core to handle different children types. Most cases are optimized for actual Components/JSX elements.
To avoid potential bugs, performance drawbacks, and improve clarity of code, functions as children should be avoided.
On several occasions I've run into issues where React is not reconciling functions as children when props change. This is hard to reproduce in an arbitrary example, but usually found deep in a project.
There have been several potentially related issues on the React project, with core devs usually mentioning that quite a bit of extra work is done in React core to handle different children types. Most cases are optimized for actual Components/JSX elements.
To avoid potential bugs, performance drawbacks, and improve clarity of code, functions as children should be avoided.
https://americanexpress.io/faccs-are-an-antipattern/
facebook/react#12715
facebook/react#11888
facebook/react#7806
facebook/react#4136 (comment)
The text was updated successfully, but these errors were encountered: