Codex
Provider
Provider
is very similar to Provider in Redux Toolkit As Provider
creates your Context API and get provider by feature in one component.
// src/App.js
import React from 'react';
import { Provider } from 'use-codex';
import { store } from './app/store';
import Post from './features/post/Post';
import User from './features/user/User';
const App = () => (
<Provider store={store}>
<Post userId={0} />
<User userId={0} />
</Provider>
);
export default App;