0

How to import react in a web code

So i have the code below. I just need to add the react and reactdom imports, I can't find a way for that. What is wrong here? https://sololearn.com/compiler-playground/WaI0Of257qqS/?ref=app

22nd Feb 2024, 9:20 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
2 RĂ©ponses
+ 2
Alex, because you are using jsx you will also need to import babel. <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> You will also need to add //</script><script type=text/babel>, this needs to be the first line of your react code and then add //</script> to the end of your react code. -btw, nice work.
23rd Feb 2024, 5:50 AM
ODLNT
ODLNT - avatar
+ 1
ODLNT that worked, thanks!
23rd Feb 2024, 6:21 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar