똑같이 따라쳤는데 라이브 서버에서 아무 것도 출력되지 않는데 제가 놓친 부분이 있을까요?
278
작성한 질문수 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>구구단</title>
<script
crossorigin
src="https://unpkg.com/react@16/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"
></script>
</head>
<body>
<div id="root"></div>
<!-- 결과 : <div id="root"><button>Like</botton></div> -->
<script type="text/babel">
class GuGuDan extends React.Component {
constructor(props) {
super(props);
this.state = {
first: Math.ceil(Math.random() * 9),
second: Math.ceil(Math.randon() * 9),
value: "",
result: "",
};
}
render() {
return (
<div>
<div>
{this.state.first}곱하기{this.state.second}는?
</div>
<form>
<input type="number" value={this.state.value} />
<button>입력!</button>
</form>
<div>{this.state.result}</div>
</div>
);
}
}
</script>
<script type="text/babel">
ReactDOM.render(<GuGuDan />, document.querySelector("#root"));
</script>
</body>
</html>
답변 1
0
콘솔에는 react.development.js:2337 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M92, around July 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details. 와 같은 에러가 뜹니다.
npm run dev 실행 시 포트가 안뜨는 문제
0
235
2
timeouts.current를 useEffect 의 input값으로 넣었을때
0
95
2
렌더링 테스트 코드 (Hooks)
0
92
1
Cannot find package 'react-refesh' 이런 에러 뜨시는 분들 보세요.
0
164
1
해당 에러 뜨는 분들 보세요. "Uncaught TypeError: ReactDom.createRoot is not a function"
1
204
1
강사님 레포지토리에서 코드 복사 시 master 브랜치 말고 react18 브랜치꺼 복붙하세요ㅠㅠ
0
105
1
useMemo와 useCallback 사용 시기
0
217
2
onRightClickTd가 작동을 하지 않습니다.
0
233
1
action.type 불러오는 방식
0
225
2
onClickRedo 질문
0
176
1
const Try = require(./Try) 빨간줄
0
258
1
npx webpack 실행시
0
323
1
지뢰찾기 강좌에서 빈칸들 한번에 열기 파트에서 여쭤보고싶은부분이 있어서 글 올립니다.
0
240
1
강좌에서 다루지 않은 기능들은 어떻게 학습하면 좋을까요?
0
318
1
react devtool이 enable 않됩니다.
0
544
2
React 랜더링이 되지 않습니다.
0
421
2
비동기로 동작하는 setState에 대해서
0
337
1
npm run dev 할 때 에러발생
0
494
2
memo, PureComponenet, shouldComponentUpdate 관련 질문
0
210
1
devMiddleware의 필요성
0
357
1
리액트에서 화살표 함수를 사용해야하는 이유
0
946
2
path.join관련질문
0
287
2
2-9. 웹팩 데브 서버와 핫 리로딩 설치과정 시 에러
0
384
1
next.js 에서 이와 비슷한 예제를 돌리고있는데 react랑 달라서 질문 드립니
1
502
4





