Using UMI plugin keep alive to realize keep alive state storage in UMI Ant Design

Using UMI plugin keep alive to store the keep alive state

$ npm install umi-plugin-keep-alive --save
$ yarn add umi-plugin-keep-alive

2. Use

import { KeepAlive } from 'umi'
const contentList = () => {
	return (
				name="/About" //Can unload the <KeepAlive> node in the cached state by name
				saveScrollPosition="screen" //automatically saves the scroll position of the shared screen container
				when={true} > //true unloads when cached, false unloads when not cached
				<About/> //Component to save state for

This function is based on react activation. For more details, please refer to react activation

Read More: