Reactor Networks & React

I realized that the Reactor Networks web lab would be a candidate for converting to a React app. In this lab, web elements such as CSTRs and PFRs are added and removed from the web page. React’s self-contained components, which can be added and removed from the DOM, are designed for this purpose. At this point, I have decided to stick with plain Javascript and my current approach, which is similar to what React does.

In the current approach, functions that create a component such as a PFR are contained in separate JS files. When called, a function returns a template string (template literal) with the HTML that labels and displays the components. The standard JS function insertAdjacentHTML is used to add this component to the DOM. No external data is involved, so this is safe. The standard JS function remove is used to delete the component.

Please send us a message letting us know what you think at support@reactorlab.net