JavaScriptServices icon indicating copy to clipboard operation
JavaScriptServices copied to clipboard

Disabling client side javascript results in EPIPE broken pipe error

Open cramhead opened this issue 9 years ago • 4 comments

Title

Disabling client side javascript results in EPIPE broken pipe error

Functional Impact

After disabling the JavaScript in the browser and refreshing the div with the Loading... text is displayed instead of the Home component with NavMenu.

Minimal repro steps

  1. dotnet new react to create a new react application
  2. dotnet restore to restore nuget packages
  3. npm install to install JavaScript dependencies
  4. dotnet run to start the application.
  5. At this point the application is running fine on localhost:5000
  6. Disable JavaScript on MacOS chrome version 56.0.2924.87 (64-bit). Any browser I tried has the same issue
  7. Refresh the page
  8. Window reloads with "Loading..." displayed instead of the expected server side rendered application.

Expected result

After refresh the NavMenu and Home component should display when the route is localhost:5000

Actual result

The loading div shows

Further technical details

dotnet --version 1.0.0-rc4-004771

OS: macOS Sierra Version 10.12.3

cramhead avatar Feb 27 '17 03:02 cramhead

The React template doesn't support server-side prerendering. The ReactRedux template does support it.

This is because with React alone (not Redux), you would have to invent your own system of transferring server-side state to the client so the client-side app could continue execution. But it doesn't make sense to invent your own system of doing that, as Redux/Flux/etc are designed for exact that use case and are the standard solutions.

So, change your repro steps to use dotnet new reactredux and things will be better :)

SteveSandersonMS avatar Mar 07 '17 15:03 SteveSandersonMS

Thanks Steve. I guess I should have thought on it a bit, and it should have been clear. I'm want to try MobX and mobx-state-tree instead of Redux.

cramhead avatar Mar 07 '17 21:03 cramhead

@cramhead can you share your mobx template if it is ready?

fatihapaydin avatar Jan 03 '18 01:01 fatihapaydin

I would have loved to, but alas I move onto something else entirely. I was planning to circle back on this when I find some time.

cramhead avatar Jan 03 '18 17:01 cramhead