New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 16 server renderer breaks with style object in prod mode #10299

aickin opened this Issue Jul 27, 2017 · 1 comment


None yet
2 participants

aickin commented Jul 27, 2017

There is a bug in the React 16 beta server renderer, reported by @7rulnik in the React 16 beta thread, where the renderer throws an exception when style is included and NODE_ENV is production.

Given this file:

// index.js
const React = require('react')
const ReactServer = require('react-dom/server')
const foo1 = React.createElement("div", {
  className: "sign-link",
  id: "sign-layout-link",
  style: { position: 'absolute' }


If you run NODE_ENV=production node index.js, you'll get:

TypeError: re is not a function
    at /Users/v7rulnik/projects/kupibilet/internals/
    at /Users/v7rulnik/projects/kupibilet/internals/
    at f (/Users/v7rulnik/projects/kupibilet/internals/
    at b (/Users/v7rulnik/projects/kupibilet/internals/
    at e.renderDOM (/Users/v7rulnik/projects/kupibilet/internals/
    at e.render (/Users/v7rulnik/projects/kupibilet/internals/
    at (/Users/v7rulnik/projects/kupibilet/internals/
    at Object.T [as renderToString] (/Users/v7rulnik/projects/kupibilet/internals/
    at repl:1:13
    at ContextifyScript.Script.runInThisContext (vm.js:44:33)

Weirdly, dev mode does not throw an error.


This comment has been minimized.

Show comment
Hide comment

gaearon Jul 27, 2017


Fixed in 16.0.0-beta.2.


gaearon commented Jul 27, 2017

Fixed in 16.0.0-beta.2.

@gaearon gaearon referenced this issue Aug 1, 2017


React 16 Umbrella ☂️ (and 15.5) #8854

117 of 120 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment