I have this peace of vanilla js code that needs to notify a React component for a certain event. How to do it?
Please note, I do not want to read about Flux/Redux, Thinking in Components, etc. I just want a plain and simple one-liner for communication between Javascript code and React. Probably I am looking for some kind of pub/sub pattern without relying on another 3rd party library.