7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

CDNオンリーでReactを動かしてみた

Posted at

これだけで良かった。

<script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>

<div id="root"></div>
<script type="text/babel">
        let dom = document.querySelector("#root");
        const { useEffect } = React;
        const App = () => {
            useEffect(() => {
                    console.log("Processed useEffect");
                })
            return(
                <div>
                    <p> CDN only で Reactが使えるか確認中 </p>
                </div>
            );
        }
        ReactDOM.render(<App />, dom);
</script>

参考にしたリンク

7
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?