Skip to content

xialvjun/cache-react-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wrap a component class and get the CachedComponent.

This CachedComponent will calculate a key from props and use the key to decide whether to construct a new instance and cache the old or to recover the old component from cache and update props.

We can use it with react-router easily to save up the time of constructing the RouteComponent you already constructed, and achieve an much more fluent routing experience like the native apps.

And besides, this tool also offers some switching component hooks. You can use these hooks to make something like animation and so on.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published