coding/React & Next 5

export 'useHistory' (imported as 'useHistory') was not found in 'react-redux'

ERROR in ./src/components/Header.jsx 16:16-26 export 'useHistory' (imported as 'useHistory') was not found in 'react-redux' (possible exports: Provider, ReactReduxContext, batch, connect, createDispatchHook, createSelectorHook, createStoreHook, shallowEqual, useDispatch, useSelector, useStore) https://velog.io/@gaheekim610/Attempted-import-error-useHistory-is-not-exported-from-react-router-dom A..

coding/React & Next 2022.10.14

[PrivateRouter] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>

유튜브 보면서 하다가 본 에러. 유튜브 영상이 과거에 만들어진 것 같아서 난 오류 같다고 생각했었다. (아 글구! 에러창에는 파일명으로 PrivateRoute라고 다들 쓰더라.. 유튜브에서는 Router로 했던데, 나도 수정해야겠음.) 찾아보기 시작. 내용을 대략 살펴보니, 해당 에러 검색창의 상단 3개 정도는 Navigate, Outlet 를 사용해서 해결한 듯 했다. https://stackoverflow.com/questions/70608889/uncaught-error-privateroute-is-not-a-route-component-all-component-childre?rq=1 Uncaught Error: [PrivateRoute] is not a component. All component..

coding/React & Next 2022.10.11

React Router

// This is a React Router v6 app import { BrowserRouter, Routes, Route, Link } from "react-router-dom"; function App() { return ( ); } function Users() { return ( My Profile ); } 리액트는 SPA (Single Page Application) 방식이다. 기존 웹 페이지 처럼(MPA, Multiple Page Application 방식) 여러개의 페이지를 사용해서, 새로운 페이지를 로드하는 방식이 아니다! React-Router는 신규 페이지를 불러오지 않는 상황에서 각각의 url에 따라 선택된 데이터를 하나의 페이지에서 렌더링 해주는 라이브러리 라고 볼 수 있다! h..

coding/React & Next 2022.09.26

[react] operation not permitted, rename (파일명 변경 안 될 때)

https://github.com/facebook/create-react-app/issues/9091 Error: EPERM: operation not permitted, mkdir 'C:\Users\Vaidehi' TypeError: Cannot read property 'get' of undefined · Issue #909 Im trying to create a react app using command create-react-app and getting the error of, MY COMMAND: (using . as i want to create the app in the current folder itself) C:\Users\Vaidehi Shah\Desktop... github.com 상..

coding/React & Next 2022.07.15