목록JavaScript/React (3)
개발
REACT-CREATE-APP Parcel을 이용하여 빌드하기 parcel 설치 npm install -g parcel parcel 래퍼런스 리액트 가이드에따라 실행해봤다. (https://en.parceljs.org/recipes.html) parcel ./public/index.html 결과 × E:\Study\IntelliJ\parcel\public\index.html: URI malformed at decodeURIComponent () at HTMLAsset.resolveDependency (C:\Users\Leehuseung\AppData\Roaming\npm\node_modules\parcel-bundler\src\Asset.js:94:22) at HTMLAsset.addURLDependen..
axios 요청이용시 쿠키 set 실패 Axios를 이용해 토큰을 보내서 토큰 검증후에 쿠키에 로컬에 보내려함. Axios.post('http://localhost:9090/login',{ token : token, social_type : social_type widhCredential : true }).then(function(res){ }).catch(function(err){ }); Network에서 응답값에는 쿠키를 확인할 수 있는데, application 들어가서 보면 안보임.. 검색후에 다음과 같이 변경 Axios.post('http://localhost:9090/login',{ token : token, social_type : social_type },{ wi..
JSX html의 class는 예약어이기 때문에 className으로 대체한다. style은 객체를 이용한다. '-' 문자가 있는경우 CalmelCase를 이용한다 abcd 변수를 dom에 사용할 수 있다. function App(){ const text = 'abcd'; return( {text} ); } 객체를 dom에 사용할 수 있다. function App(){ const site = { name : "mysite", url : "localhost:3000" }; {site.name} } 특정 컴포넌트에 특정 css파일만 import해서 쓰기 파일명을 모듈명.module.css로 생성한다. 다음처럼 import할 수 있다. className은 다른 방식으로 사용해야한다..