Answer the question
In order to leave comments, you need to log in
How to organize the appearance of components based on listeners?
Inside CEF, react is used. Listeners are hung on the client and catch everything that comes from the server. It is necessary, depending on what the server is sending, to show the required component, possibly several components.
How to properly organize the react application logic so that there are no problems with expanding the project in the future.
I am a beginner and have already broken my head on how to properly catch and show / hide a component.
In which file/files to place all listeners and show/hide components.
Answer the question
In order to leave comments, you need to log in
In the parent component, we set listeners and create a state (state). When catching an event, we change the state. We pass the state through props to the child components and, according to the condition tied to the state from the parent, hide or show what is needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question