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
veeramarni edited this page Jun 12, 2021
·
9 revisions
Synchronous Code only: Don't write any asynchronous code (avoid promises, await) directly in the UI. Use libraries such as React Query to better manage the asynchronous code.
No Expansive code: Don't write expensive code with react components that would take full state
If you ever need to take a full state either from redux or apollo-client and further computed within the component would result in bad
performance.
If the state has nested objects which cause the props to more prone to changes causing unwanted Component rendering.
this code won't be reusable.
So in that case, use selectors and inject them into props so it resolves the above-mentioned issues.