Closed mauricioklein closed 1 year ago
By the way, I've made the most simple test possible:
A dummy component:
import React from 'react';
const HelloWorld = () => (
<h1>Hello World!</h1>
);
export default HelloWorld;
and a single route:
<Route path="/" component={HelloWorld} />
Acessing / with JS enabled in browser, I got the correct hello world message.
However, disabling JS on browser, I still get a blank page, with <noscript>
on page body.
So, it seems the problem is related to how server side is dealing with routes definition.
@erikras Could you please take a look at this? Would be so kind have an opinion from your part. Thanks :+1:
Another discovery:
With both JS enable and disabled, the server renders the element as a <noscript>
element.
However, with JS enabled, client is able to interpret it and render correctly.
Without JS, nothing is shown.
Yeah, i stuck at that moment too
Change version of "redux-async-connect" to "1.0.0-rc3" helped me
@TPABHuKOB thanks for your beautiful answer
You can also use https://www.npmjs.com/package/redux-connect that is up to date.
@TPABHuKOB Thank you!
Hello!
I'm facing a strange behavior: All my routes is working fine in dev mode, and everything is being rendered as expected.
However, when I run production mode and disable JavaScript from browser, the HTML component is rendered correctly, however the
<body>
renders the component as a<noscript>
tag, and nothing is displayed.After some research, I found this can be a problem with react-router, meaning that the route didn't match, which is not the case, because on dev mode it works well.
Any idea what could be the problem? How can I debug this error?
Thanks in advance for any support!
PS: my
server.js
androutes.js
files are available on this gist. The only customization onserver.js
was to remove the mocked API related code, unnecessary for us.