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.
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".
I've tried again updating to v16, but I am getting some really weird behaviour https://youtu.be/jsG9_gC5cy4. CC /u/brianvaughn Sorry for a video instead of a replicable test case. I can try to isolate this, but it is no small task.
Whatever is going on here, I am able to replicate it using v15.
The issue exists afterall. I have noticed drop in traffic after updating production to React 16.0.0-rc.2. Turns out it is due to new pages not being indexed.
You will need to use an old browser such as Chrome v25.
That error:
Uncaught TypeError: cannot set property 'nextEffect' of undefined
Is coming from react code base.
The same issue is affecting Fetch as Google.
I am not able to replicate the same issue using "Hello, World" example. I am guessing it might be something to do with setState or context being using in the real world app.
Hi /u/gajus0! 16 beta 3 was release this afternoon. We believe it will resolve the Google crawler issue you mentioned. Would you be willing to give it another try?
Right, but you have literally no idea what limited sandboxed JS Google will run. You have to design your pages assuming Google's not going to run anything.
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.