Replacing components with button click
Answered
Pollock posted this in #help-forum
PollockOP
How does one replace components on button click for example?
ReplaceWith doesnt work on custom react components, only standard html elements...
ReplaceWith doesnt work on custom react components, only standard html elements...
Answered by LuisLl
Just render the other component in place of the previous one when you perform certain event.
Control it with React state.
Control it with React state.