r/javascript • • Jul 26 '17

React 16 beta

https://github.com/facebook/react/issues/10294
36 Upvotes

26 comments sorted by

View all comments

11

u/gajus0 Jul 26 '17

A fair warning: I did not manage to get a basic React v16 application to be index by Google. It looks like something in their code-base is breaking the Google crawler. The same issue can be replicated using old Chrome version, e.g. Chrome v24. I've sent a message about it to a member of the React team, but haven't heard back yet.

3

u/brianvaughn Jul 27 '17

Is this something specific to version 16?

If so, do you have a repro?

If so, will you add info as a comment on the issue this post links to?

2

u/gajus0 Jul 27 '17

It is specific to v16. Repro would be a simple ReactDOM.render(<div>Hello, World</div>, [..]) and then just try to render the page using Fetch as Google (see https://medium.com/@gajus/react-application-seen-as-a-blank-page-via-fetch-as-google-afb11dff8562).

As to why I have not created an issue, to quote my original message (07/12/2017):

Didn't post on social media/ public as it would cause unnecessary FUD, esp. if unconfirmed by Google

1

u/Capaj Jul 27 '17

Gajus just curious-did you include the Map/Set polyfills when you tried that?

2

u/gajus0 Jul 27 '17

I was using https://polyfill.io/v2/ when testing this, i.e. yes.

1

u/gaearon Jul 27 '17

Did you try UMD builds or did you bundle the app? Can you provide a full reproducing example please?

1

u/gajus0 Jul 28 '17

I've bundled the app using webpack. I've tried to setup a simple demo, but for some reason this build is failing entirely; some error about usage of "use strict".

https://github.com/gajus/react-webpack-babel-tutorial

Will look into it tomorrow morning.

1

u/gaearon Aug 03 '17

Can you please try again with 16.0.0-beta.3?

We fixed the use strict issue, and the crawler issue might also have been caused by it.

2

u/gajus0 Aug 04 '17

I can confirm that with 16.0.0-beta.3 I was able to render the application using both Chrome v25 and Fetch as Google.