Is it good idea to use global variables for communication between 2 components in react.js. Or is it bad practice.
If no, can somebody explains, whats are the drawbacks of it.
Thanks
Any global variables in most cases is bad practice in React applications.
If you have some data, which should be used by many components, consider using some Flux library like Redux.