Closed akshatbhargava123 closed 5 years ago
I think in this case we should aim to be permissive rather than restrictive. The goal of the generator is to make it easy for people who are either
Since there are many right ways to do javascript, and/or for the second use-case even if it uses out-of-date practices, the person wrapping the tool may not wish to spend time updating it to fit in with a rigid framework.
Do we think there might be a way to extend this generator in a separate package, so that we can still have a re-usable preact solution for you (and others who wish it) to use, without enforcing it?
alright, looking at the conditional way you've included it, I'm fine with that. Ignore my last comment! :)
Issue
When we've to build complex layouts from the tool, it becomes real pain since writing concatenated HTML strings just spoils code quality or using DOM API to create elements for us and then styling them in JS would also just bloat our code badly.
Fix
To add some "HTML in JS" solution like JSX which comes with
React
orPreact
. After have a discussion with Herald, I got to know that Intermine is usingre-compose
in Bluegenes which is in a way dependent onReact
, so we must haveReactDOM
on the window object, we should setup babel in the generator-tool so that it would allow us to write JSX and some modern browser finally leading to maintainable and clean code.