Comments (8)
Solution problem with material-ui is:
Install babel-plugin-transformer-decorators-legacy and babel-preset-stage-1
$ npm install --save-dev babel-plugin-transform-decorators-legacy
$ npm install --save-dev babel-preset-stage-1
File .babelrc
{
"presets": ["react", "es2015", "stage-1"],
"plugins": ["transform-decorators-legacy"]
}
File shared/container/App.js
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import getMuiTheme from 'material-ui/lib/styles/getMuiTheme';
import themeDecorator from 'material-ui/lib/styles/theme-decorator';
@themeDecorator(getMuiTheme(null, { userAgent: 'all' }))
class App extends Component {
constructor(props, context) {
super(props, context);
}
render() {
return (
<div>
{ this.props.children }
</div>
);
}
}
App.propTypes = {
children: PropTypes.node.isRequired
};
export default connect()(App);
I hope this solves your problem at least to me I fix me and Material-ui have regular running smoothly rendering
from mern-starter.
Thank you so much for your help. Server rendering now works like a charm.
from mern-starter.
Hi, server rendering works now but everything becomes significantly slow :P . There is a latency between the user action and the response of the app. For example, when I type a letter, it takes a while to display the change on the input field.
from mern-starter.
@carloscuatin Hey Carlos, as you can see here: https://github.com/lorix-lpan/mern-starter, the latency is quite obvious. Is there a way to resolve this?
Thanks again
from mern-starter.
@lorix-lpan latency produced by every user-agent: all
, I'm looking for a solution
from mern-starter.
Thank you very much!
from mern-starter.
Hey @carloscuatin, I rolled back to version 0.14.2 and the latency disappears with exactly the same code. I think it is an issue with material-ui. Thanks again for your help
from mern-starter.
@lorix-lpan if exactly that would indeed discuss the issue opened a repository-ui material as this is an error in the autoprefixer
from mern-starter.
Related Issues (20)
- Problem with production mode in server HOT 2
- TypeError: Cannot read property 'table' of undefined HOT 1
- postcss-cssnext is technically deprecated HOT 1
- Upgrading to webpack 4 breaks the mern-starter HOT 1
- Error importing header / footer background image HOT 4
- Deploying the app using PM2 in EC2 HOT 3
- this.props.history is undefined Trying to access history object HOT 2
- Website is lacking pictures HOT 1
- Upgrade to React Router (MERN 2.6) HOT 6
- Add provision for code-splitting as required
- Can't resolve DNS host HOT 2
- The images on mern.io requested from res.cloudinary.com are resulting in 401 errors (and thus aren't successfully loading)
- Error comment in scss file HOT 1
- How to integrate Reactstrap into mern-starter HOT 4
- Code execution continues when it should stop in POST action HOT 1
- 3.0啥时候好呢,我们等的黄瓜菜都凉了! HOT 2
- RESTful MERN in Typescript - A new project other than this one
- MSBuild.exe` failed with exit code: 1
- Grammatical error on Twitter redirecting text 📝
- Alternative to this repo : Mern Starter Project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mern-starter.