Reactjs multiple pages need to get the values returned by the same ajax.

there are multiple pages that need to have a property that needs to call the API to return judgment display logic
my idea is to cache but how to write multiple pages to write code as little as possible
want a rough code design framework

it"s not how I want to cache, but how to do routing or components that can introduce this variable on every page instead of calling ajax

once.
Feb.28,2021

write a js to introduce the js in the public introduction place of each page. This js set get modification deletes to get the data?
or localstorage?


if there is no store, localstorage is definitely the best way


share a reducer with redux,


should use a state manager, such as redux, mobx, reflux.
We use dva state Manager

produced by Ali.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e847c2-cdc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e847c2-cdc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?