DEV Community

Discussion on: Frontend Challenges: Front-end Engineer Assignment

Collapse
 
teekay profile image
TK

Thank you! Really appreciate! :)
The Context API can be a performance bottleneck if used in the wrong way.
If you wrap your component and use a consumer only it really need to be used, you "solve" prop drilling and re-render only the necessary parts of the component (components that directly use the provider value).

You need to always be careful when implementing a context api driven component and keep track of the re-renders in your component. Other state management libraries could be a better choice for more complex cases.

Collapse
 
dmitrysobolevsky profile image
Dmitry Sobolevsky

Thanks for explanation. Appreciate it