Is there any open source code or examples that try to do caching of rendered React components on memcached or something simillar? Anyone that has already dealt with this?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
Like FakeRainBrigand suggested, you can just save the html. However, one neat thing about react is that every component is represented with state/props. This means if you suitably represent your UI with those fields, you should be able to reproduce your page given the same state/props.
This could possibly mean that if you stored the state/props somehow, and loaded it back up, you could effectively "cache" the components for later, and very cheaply at that. I'm thinking something similar to this below: