Skip to content

Instantly share code, notes, and snippets.

@hosembafer
Last active July 23, 2019 09:02
Show Gist options
  • Save hosembafer/a48ab0f14492828acd2644da492595ca to your computer and use it in GitHub Desktop.
Save hosembafer/a48ab0f14492828acd2644da492595ca to your computer and use it in GitHub Desktop.
import React from 'react';
const createStoreProvider = providers => ({ children }) => providers.reverse().reduce((tree, Provider) => <Provider>{tree}</Provider>, children);
export default createStoreProvider;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment