Node js/React(11)
-
(리액트) Uncaught SyntaxError: Unexpected token '<' (at ...)
index.html 소스 : 이것을 브라우저에서 열면 Uncaught SyntaxError: Unexpected token '
2023.04.06 -
React 클래스형 + (코드 분리 방식)
원문 출처 : https://ljh86029926.gitbook.io/coding-apple-react/1/component-of-react#undefined-1 Component Of React - React 이런식으로 하나의 HTML파일에 header, main, footer부분까지 하나의 파일에 작성하게 됩니다. 그러나 리액트는 컴포넌트 구조로 작성을 할 수 있기 때문에 각각의 부분을 분리해서 작업을 진행할 수 ljh86029926.gitbook.io
2023.04.05 -
React 함수형 선언방식
npx create-react-app 을 실행하면 생성되는 src/App.js 에서 볼 수 있다. import logo from './logo.svg'; import './App.css'; function App() { return ( Edit src/App.js and save to reload. Learn React ); } export default App;
2023.04.05 -
React 방식으로 요소 추가하기
https://stackoverflow.com/questions/66966134/how-to-pass-child-element-to-parent-in-react How to pass child element to parent in React How can i pass child element to parent element and then render it using React? Example of my code: let persons = [{name: 'Bill', age: '25'}, {name: 'John', age: '35'}]; // etc etc function stackoverflow.com
2023.04.05 -
render 테스트
import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; const myElement = I Love JSX!; //const divElement = React.createElement('div') const myElement2 = React.createElement('h1', {}, 'I do not use JSX!'); const root = ReactDOM.createRoot(document.getElementById('root')); root.render(myElement); function runAfter() { root.render(myElement2); } setTimeout(runAfte..
2023.04.05