import React from 'react' ; import { Provider as UserProvider } from './user' ; import { Provider as TagProvider } from './tag' ; export { useUserStore } from './user' ; export { useTagStore } from './tag' ; /**
 * <Provider1>
 *  <Provider2>
 *      <Provider3>
 *          <App/>
 *      </Provider3>
 *  </Provider2>
 * </Provider1>
 */ const providers = [ UserProvider , TagProvider ] ; const Provider = ( props ) => providers . reduceRight ( ( children , Parent ) => < Parent > { children } < /Parent>, props.children); export default Provider ;