Advertisement
fakesamgregory

Master React in Webflow - Getting Started in Webflow

Nov 6th, 2024 (edited)
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
  2. <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
  3. <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
  4.  
  5. <script type="text/babel" data-presets="env,react">
  6.     /* CHOOSE HOW YOU GET YOUR ELEMENT */
  7.     const element = document.getElementsByClassName('react')[0];
  8.     // const element = document.getElementById('app');
  9.     // const element = document.querySelector('react');
  10.     const root = ReactDOM.createRoot(element);
  11.     root.render(<h1>Hello world!</h1>
  12. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement