Git Product home page Git Product logo

react-server-example's Issues

Doesn't work when javascript disabled

When you disable javascript in google chrome this example does not work. The whole point of mutual server/client rendering is to get rid of dependency on javascript libraries loading. Any thoughts?

How should i pass data to component in 'real world' server-rending

In this example, component receive data while we doing server render, and in browser, component is rendered with "inline" data.

  '<script>' +
    'var MyApp = React.createFactory(require("myApp"));' +
    'React.render(MyApp(' + safeStringify(props) + '), document.getElementById("content"))' +
  '</script>'

but in real world, i can't wirte a bunch of data in my html or js file. How should i do browser data passing?

send a ajax request and render component after response? this makes server deal with 2 times data-query

get data from server-rendered html?

safeStringify with react 16 hydrate

safeStringify in react 16 hydrate produces errors like this
Warning: Text content did not match. Server: "</script>fasdfsfsf </script>ย " Client: "</script>fasdfsfsf </script>"

Writing App.js in JSX

Hey,

Thank you so much for this example, it is extremely helpful.
Is there a way to achieve the same result using JSX?

Thanks in advance,
Tomer

React.createClass is deprecated

This message while starting the server, it works but:

Warning: A Component: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.