CJY0208 / react-router-cache-route

Route with cache for react-router V5 like <keep-alive /> in Vue
https://www.npmjs.com/package/react-router-cache-route
MIT License
1.16k stars 113 forks source link

Deprecation of defaultProps #172

Open apartx opened 1 month ago

apartx commented 1 month ago

React deprecating defaultProps and says that it need to use default JS features:

Снимок экрана 2024-10-18 в 13 44 46

I guess like this:

...
render() {
    const {
      children,
      which = element => get(element, 'type.__name') === 'CacheRoute',
      autoFreeze
    } = this.props
    ...
}
apartx commented 1 month ago

Created PR #173