Skip to main content
Version: 4.x.x

React Config Provider

We can set the default settings of our hooks by context wrapper. The <ConfigProvider /> will help us with this task. It's config prop will override the default options and give you more control over their global behavior.

const customConfig = {
useFetchConfig: {
bounceTime: 200,
// ...
},
useSubmitConfig: {
deepCompare: () => null,
// ...
},
useCacheConfig: {
// ...
},
useQueueConfig: {
// ...
},
};

// Our main app component
ReactDOM.render(
<ConfigProvider config={customConfig}>
<App/>
</ConfigProvider>;
)