Fare warning: You need to know about React to understand this post. The problems and solutions exposes here are all using the modern react approach: Hooks.

This Post is for all those React programmers that have been cross with one particular situation.

The problem:

Imagine your are building a parent component (lets call it “PARENT”), and inside that parent component you have a child component (lets call it “CHILD”). …

Great article!!!

Also, it's worth to say that NextJs has an advance feature, called "Dynamic Imports" that works properly with SSR for lazy loading components (like the React Lazy feature). You can use this for lazy load non critical view components, that way you the page will load and show your critical/not-lazy components with all the advantages of SRR, and then asynchronously load all the lazy components.

An other use case where you can apply the third solution, is when you have several tabs, and in each tab you have form fields, and you need to get the value of all the fields of the tabs in a certain moment to make a POST request with that data.

Adrian Fernandez

I'm a Full Stack Web Developer with 10 years of experience. I have dedicated my live to web and mobile experiences.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store