Coder Social home page Coder Social logo

Comments (8)

carloscuatin avatar carloscuatin commented on August 17, 2024 1

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

capture

from mern-starter.

lpan avatar lpan commented on August 17, 2024

Thank you so much for your help. Server rendering now works like a charm.

from mern-starter.

lpan avatar lpan commented on August 17, 2024

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.

lpan avatar lpan commented on August 17, 2024

@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.

carloscuatin avatar carloscuatin commented on August 17, 2024

@lorix-lpan latency produced by every user-agent: all, I'm looking for a solution

from mern-starter.

lpan avatar lpan commented on August 17, 2024

Thank you very much!

from mern-starter.

lpan avatar lpan commented on August 17, 2024

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.

carloscuatin avatar carloscuatin commented on August 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.