CacheSwitch

· Javascript
Cache Route란? Vue의 keep-alive와 같이 react - route에는 cache route가 있다 React route의 문제점 일반 route를 사용하면 앞으로, 뒤로가기 동안 구성 요소를 캐시할 수 없으므로 데이터 및 상호작용이 손실된다. Solution route가 일치하지 않을때 컴포넌트는 언마운트 될 것이다. route의 소스코드를 읽은 후 children prop을 함수로 사용하면 렌더링 동작을 제어할 수 있다. 설치 npm install react-router-cache-route --save # or yarn add react-router-cache-route 방법 import React from 'react' import { HashRouter as Router, Ro..
개발하는뀨울
'CacheSwitch' 태그의 글 목록