New to react here and trying to wrap my head round the new Context API (I haven\'t looked into Redux etc. yet).
Seems I can do much of what I need to do, but I\'m going
Solution with for loop:
for
export const provider = (provider, props = {}) => [provider, props]; export const ProviderComposer = ({providers, children}) => { for (let i = providers.length - 1; i >= 0; --i) { const [Provider, props] = providers[i]; children = {children} } return children; }
Usage: