GithubHelp home page GithubHelp logo

react-server-rendering-example's Introduction

unmaintained

Run npm install then npm start then kill it.

You can open index.html, wait a few seconds and see the app. Or you can node server.js and open http://localhost:4000/ to see the server rendered version. Note the better performance (due to simulated JS load time) and if you edit the text field the JS won't blow it away when it loads.

react-server-rendering-example's People

Contributors

petehunt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-server-rendering-example's Issues

No compatible version found: uglifyjs@'>=2.3.6 <2.4.0'

npm install currently yields an error:

npm ERR! notarget No compatible version found: uglifyjs@'>=2.3.6 <2.4.0'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["2.4.10"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'react-server-rendering-example'
npm ERR! notarget

Attached npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 info start [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec start script
9 verbose stack Error: [email protected] start: `watchify -o browser-bundle.js -d .`
9 verbose stack Exit status 127
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1015:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid [email protected]
11 verbose cwd /Users/user1/Desktop/react-server-rendering-example
12 error Darwin 14.4.0
13 error argv "node" "/usr/local/bin/npm" "start"
14 error node v0.12.2
15 error npm  v2.7.4
16 error code ELIFECYCLE
17 error [email protected] start: `watchify -o browser-bundle.js -d .`
17 error Exit status 127
18 error Failed at the [email protected] start script 'watchify -o browser-bundle.js -d .'.
18 error This is most likely a problem with the react-server-rendering-example package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     watchify -o browser-bundle.js -d .
18 error You can get their info via:
18 error     npm owner ls react-server-rendering-example
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

I'm using node v0.12.2.

server.js React.renderToString is deprecated.

I got warning:

server.js

markup = React.renderToString(Timer());

warning

Warning: React.renderToString is deprecated. 
Please use ReactDOMServer.renderToString from require('react-dom/server') instead.

react-tool is deprecated

please update dependency and serer.js

//React.renderToString(Timer(), function(markup) {
// res.send(TEMPLATE.replace(PLACEHOLDER, markup));
res.send(TEMPLATE);
//});

I just run under the latest reactJS, it recommend to not calling React.

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.