freeCodeCamp / CurriculumExpansion

Creative Commons Attribution Share Alike 4.0 International
314 stars 105 forks source link

Add React Form Lab to main repo #661

Open jdwilkin4 opened 1 week ago

jdwilkin4 commented 1 week ago

Since this prototype has been created, we can now add it to main with tests

https://github.com/freeCodeCamp/CurriculumExpansion/issues/553

a2937 commented 1 week ago

I have a silly question if you don't mind. How come whenever the script is placed inside of script.js instead of the html file, the preview fails to work due to JSX not being supported? It's been driving me mad for months. I was starting to get convinced that the only way we could use front-end libraries in the curriculum properly was to use VueJS.

The reasoning being, I was able to get VueJS to work in our editor with a CDN using the three main files; index.html, styles.css, and script.js. Thought it was without JSX.

jdwilkin4 commented 1 week ago

@a2937

Oliver did a write up in this PR here that should shed light on what is going on

https://github.com/freeCodeCamp/freeCodeCamp/pull/55860

a2937 commented 1 week ago

Okay so there is a pipeline that transforms the JSX babel.

Is it possible to get the script section away out of the html file and into it's own index.jsx file? I like my JavaScript away from the HTML usually.

jdwilkin4 commented 1 week ago

Is it possible to get the script section away out of the html file and into it's own index.jsx file?

Short answer, don't know yet. The team is playing around with that to see if it is possible.

But right now it looks like all in one file