How do you handle Providers which require props, e.g. Draqula requires a client (and so does Apollo and many others)? Am I supposed to do something like
const ProviderPack = createPack( AuthProvider, DataProvider, AnotherDataProvider, WtfProvider, ThisIsGettingReallyBigProvider, OhMyGodTheresMoreProvider, () => DraqulaProvider({ client: myClient }) );
? Not that it's too bad, now that I look at it :D
Almost there, remember that invoking components like that is not recommended, just change it to use JSX:
() => <DraqulaProvider client={myClient} />
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
How do you handle Providers which require props, e.g. Draqula requires a client (and so does Apollo and many others)? Am I supposed to do something like
? Not that it's too bad, now that I look at it :D
Almost there, remember that invoking components like that is not recommended, just change it to use JSX: