Giter Club home page Giter Club logo

Comments (4)

stevehu avatar stevehu commented on May 26, 2024

A similar problem in Brace I just opened.

thlorenz/brace#42

from react-ace.

spoike avatar spoike commented on May 26, 2024

I'm using babel-register and I ended up doing two things:

  • importing a file (./.../Editor.js) that has an empty div
  • In my browserify build, setting the browser field in package.json to the file that actually uses ReactAce (./.../Editor-browser.js). it defers the render with React Ace by using a state variable that is set during componentDidMount (with a setTimeout), so that the client-side and server-side renders don't differ, but renders ReactAce after the mount.

from react-ace.

stevehu avatar stevehu commented on May 26, 2024

@spoike I don't have any server side rendering at all. I end up have my own fixed version and install from github.

from react-ace.

spoike avatar spoike commented on May 26, 2024

@stevehu I'm referring to the error @DWboutin had, which was exact with mine where I was rendering react-ace on server-side. There is no clear explanation on how to work around the problem that brace and react-ace has a direct reference to the window object. Thus my comment to pull out the editor in node environment completely and render it instead client-side only when the component was mounted.

from react-ace.

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.