Advertisement
fakesamgregory

Master React in Webflow - Webflow Code

Nov 6th, 2024
21
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.     function HeadingOne({ children }) {
  7.         return <h1>{children}</h1>;
  8.     }
  9.  
  10.     function App() {
  11.         return <HeadingOne>Hello World</HeadingOne>;
  12.     }
  13.  
  14.     const element = document.getElementsByClassName('react')[0];
  15.     const root = ReactDOM.createRoot(element);
  16.     root.render(<h1>Hello world!</h1>
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement