Material-UI Integration
See original GitHub issueHello everyone i wonder if i might get help integrating Material-UI into this boilerplate. adding this simple wrapper + header components:
<MuiThemeProvider muiTheme={getMuiTheme()}>
<Helmet {...config.app.head}/>
<AppBar
title="Title"
iconClassNameRight="muidocs-icon-navigation-expand-more"
/>
</MuiThemeProvider>
to App container leads to errors:
Warning: Failed propType: Invalid prop `children` supplied to `MuiThemeProvider`, expected a single ReactElement. Check the render method of `App`.
[1] [piping] can't execute file: /home/kirill/code/react-redux-universal-hot-example/bin/server.js
[1] [piping] error given was: Invariant Violation: MuiThemeProvider.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.
[1] at invariant (/home/kirill/code/react-redux-universal-hot-example/node_modules/fbjs/lib/invariant.js:38:15)
[1] at ReactCompositeComponentMixin._renderValidatedComponent (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactCompositeComponent.js:713:156)
[1] at wrapper [as _renderValidatedComponent] (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactPerf.js:66:21)
[1] at ReactCompositeComponentMixin.performInitialMount (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactCompositeComponent.js:291:30)
[1] at ReactCompositeComponentMixin.mountComponent (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactCompositeComponent.js:222:21)
[1] at wrapper [as mountComponent] (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactPerf.js:66:21)
[1] at Object.ReactReconciler.mountComponent (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactReconciler.js:39:35)
[1] at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactMultiChild.js:203:44)
[1] at ReactDOMComponent.Mixin._createContentMarkup (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactDOMComponent.js:593:32)
[1] at ReactDOMComponent.Mixin.mountComponent (/home/kirill/code/react-redux-universal-hot-example/node_modules/react/lib/ReactDOMComponent.js:478:29)
I suspect server rendering being the issue but not compitent enough to solve it myself Please Help 🙌
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top Results From Across the Web
Usage - Material UI - MUI
Material UI is a mobile-first component library—we write code for mobile devices first, and then scale up the components as necessary using CSS...
Read more >How to Implement Material-UI in React - Section.io
Material -UI is simply a library that allows us to import and use different components to create a user interface in our React...
Read more >ReactJS - Material UI - Tutorialspoint
ReactJS - Material UI, React community provides a huge collection of advanced UI component framework. Material UI is one of the popular React...
Read more >How to integrate Material UI to React Js Application or Third ...
Material UI is a library of React UI components that implements Google's Material Design. Material UI is an open-source React component library that...
Read more >Material UI Tutorial - React School
Using Material UI - Rendering a Button ... Using the components is simple. Just import the component from the library and render it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@vijay122
I guess the real issue is: you can have only one child under
<MuiThemeProvider />
e.g.
should be:
@AndreLion you freaking saved my day, bless you