Changing component on mouse click
Unanswered
Encyrtid wasp posted this in #help-forum
Encyrtid waspOP
Im looking for a way to change the component from the first one to the second one when I click on it, what do I use?
10 Replies
Encyrtid waspOP
I'm building a project where this has to be done for many components so I'm looking for what I should learn to achieve this throughout multiple components
@Encyrtid wasp Im looking for a way to change the component from the first one to the second one when I click on it, what do I use?
make only one component and use it throughout the application
Encyrtid waspOP
yes but the part where it switches from one to another
?
the yellow is also a div
Encyrtid waspOP
I was wondering what I can do to "load" the second div, another component
a state, set it to false by default and set it to true on click and then render the red div
Encyrtid waspOP
which docs should I read for details on how to achieve this?
@Encyrtid wasp which docs should I read for details on how to achieve this?
this is just react's state basics