Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Clarify how to share a component between server and client #54

Open
adelevie opened this issue Jan 25, 2014 · 0 comments
Open

Clarify how to share a component between server and client #54

adelevie opened this issue Jan 25, 2014 · 0 comments

Comments

@adelevie
Copy link

I got to hello world with this:

/**
 *
 * @jsx React.DOM
 */

var React = require('React');
var SiteBoilerPlate = require('../core/SiteBoilerPlate.js');
var Banner = require('../elements/Banner/Banner.js');

var hello = React.createClass({

  render: function() {
    return (
      <SiteBoilerPlate>
        <h1>HELLLLOO!!!!!111</h1>
      </SiteBoilerPlate>
    );
  }
});

module.exports = hello;

I'm wondering how I access this component from the client. I'm assuming that as it stands now, if I fire up node server.js and visit localhost:8080/pages/hello.html, that this is all rendered on the server. How would I render this from the client?

Perhaps the answer is obvious, but it's not obvious to me, and maybe many others.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant