Global Provider Resolver
In addition to different theme pages, there are certain miscellaneous components and functions that are returned from the theme bootstrapping function.
📄️ Global Provider
Theme developers can provide a GlobalProvider from the theme, wrapping it at the root of the React app. Create a React HOC as your wrapper, as shown in the example.
📄️ Global Data Resolver
The globalDataResolver is designed to handle API calls required during the initial loading of the application. This function is executed by theme engine only once and it gets the applicationID and the fpi instance as arguments- and performs asynchronous calls to fetch essential data. The function calling is managed by the Skyfire Theme Engine; theme developers just need to define the function.
📄️ Page Data Resolver
The pageDataResolver is designed to handle API calls required on every route change of the application. This function is executed by the theme engine, which gets the themeId, router, and the fpi instance as arguments - and performs asynchronous calls to fetch essential data. The Theme Engine manages the function call; theme developers just need to define the function.