In <Nav/>
component, "click event" on chevron <button>
, triggers nextTitle(length)
function in useNextTitle.js custom hook. This function sets the value of val
, which is being returned by useNextTitle.js. How to pass that new val
to App.js ?
Bigger picture: I want to change the display between <Dod />
and <Analogia />
(in App.js), after "click event" in <Nav />
(figured out val
would be helpful for that, as a parameter in Conditional Statement).
Functionality I`m trying to achieve is visualized on the website I done with vanilla Java Script :