React 2

정준호·2022년 6월 28일
0

React

목록 보기
2/13
<!DOCTYPE html>
<html>
<body>
    <div id="root"></div>
</body>
<script src="https://unpkg.com/react@17.0.2/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@17.0.2/umd/react-dom.production.min.js"></script>
<script>
    const root = document.getElementById("root");
    const span = React.createElement(
        "span",
        {id:"sexy-span", style:{color:'red'} },
        "Hello I'm a span"
        );
    ReactDOM.render(span,root);
</script>
</html>

profile
파이팅

0개의 댓글