Background: I am using react-async-component and react-jobs for API calls throughout my app.
I need to make an initial API call to get some app defaults that will never change, but need the data to be available to components throughout the app. I am using config for static vars that I define manually, but wanted to know if I can also make an Ajax call (axios) in there to grab these API result vars and make them available throughout the app just like other config vars. Also, since this data will be used to setup components, I need to make sure this data is received before the app is rendered.
What are your thoughts on how to best achieve this? Thanks!
Background: I am using react-async-component and react-jobs for API calls throughout my app.
I need to make an initial API call to get some app defaults that will never change, but need the data to be available to components throughout the app. I am using config for static vars that I define manually, but wanted to know if I can also make an Ajax call (axios) in there to grab these API result vars and make them available throughout the app just like other config vars. Also, since this data will be used to setup components, I need to make sure this data is received before the app is rendered.
What are your thoughts on how to best achieve this? Thanks!