jcoreio / crater

Meteor/Webpack/React SSR app skeleton that runs your app code outside of Meteor Isobuild
ISC License
82 stars 10 forks source link

When DISABLE_FULL_SSR is enabled, the text 'false' flashes on page reload. #77

Closed darkadept closed 7 years ago

darkadept commented 7 years ago

If you have DISABLE_FULL_SSR enabled and you refresh the page (aka initial page load) the word "false" flashes briefly.

The reason is this code (line 25 Html.js):

    const root = PROD && !process.env.DISABLE_FULL_SSR && renderToString(
      <Provider store={store}>
        <RouterContext {...renderProps} />
      </Provider>
    )

I've replaced it with this:

    let root = renderToString(<div/>);
    if (PROD && !process.env.DISABLE_FULL_SSR) {
      const root = renderToString(
          <Provider store={store}>
            <RouterContext {...renderProps} />
          </Provider>
        )
    }
jedwards1211 commented 7 years ago

Yeah, I saw this, but I think I fixed it in https://github.com/jcoreio/crater/commit/89834582fbb41c54526df43b738d62ce68b1c9e2. Is it still an issue with the latest master? I know it can be tough merging in changes to this skeleton...

jedwards1211 commented 7 years ago

I'm closing this. If you're able to repro with master I'll reopen it