irychen / keepalive-for-react

React KeepAlive is a component that can cache the state of the component and reuse it when needed.
MIT License
193 stars 34 forks source link

Features Request Board #34

Open irychen opened 23 hours ago

irychen commented 23 hours ago

I am planning to add a cache auto-expire feature

function Layout(){
  return (<KeepAlive maxAliveTime={"20s"}>
        {/*....*/}
  </KeepAlive>)
}
function Layout(){
  return (<KeepAlive maxAliveTime={{
   "admin/dashboard":"20s"
  }}>
        {/*....*/}
  </KeepAlive>)
}