-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or request
Description
We should be able to access props at _app.js level, it can be declared as
`
const { fetchMediaDataFromCMS } = require('./service/mediaData.service');
module.exports = () => ({
'/_app': [{ key: 'mediaPosts', data: fetchMediaDataFromCMS }],
});
`
Also, if same function is called by another page let's say
`const { fetchMediaDataFromCMS } = require('./service/mediaData.service');
module.exports = () => ({
'/2021/[id]': [{ key: 'mediaPosts', data: fetchMediaDataFromCMS }],
'/2022/[id]': [{ key: 'mediaPosts', data: fetchMediaDataFromCMS }],
'/_app': [{ key: 'mediaPosts', data: fetchMediaDataFromCMS }],
});
`
then, it should load the data for other pages from cache of the library, should not call the same function to evaluate again and again.
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or request