Open gnapse opened 7 years ago
Were you able to get it working with CRA 1.3.1 with the example code?
Specifically, this isn't working for me:
const App = ({ children }) => (
<ThemeProvider theme={theme}>
{children}
</ThemeProvider>
);
export default App;
It gives me the error: React.Children.only expected to receive a single React element child
At a glance I think that does not have to do with my changes. The error you mention above is due to ThemeProvider
not supporting more than one child element. If children
in your example is an array of more than one item (or probably if it is an array of a single element) ThemeProvider
will complain.
Hello?
Just made a new react app using CRA and toolbox, this PR had the only steps missing to make integration flawless today. Would love to see this merged 🙂
src/
because you can't normally import from outside it.theme.css
file, which is absolutely needed for this integration to work.These are based on my experience while trying to follow the instructions to integrate
react-toolbox
into a React app created withcreate-react-app
. Especially the missing line importing thetheme.css
file was daunting for a few minutes, and almost made me quit and look for alternatives.