Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Change state functionality

The plan is to initialize and centralize the state somewhere where both components can pull this information from.

That’s on the parent component!

We will initialize state with the value of the input as an empty string, and then a function that is going to be executed from the form field anytime the data changes there!

Then, anytime the data changes, the value gets updated, the state changes and the paragraph depicts automatically the new value!