Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Who's way of using is correct? FCscripters? Yours? Both? #8

Open
Joshua-Ronan-Phillips opened this issue Nov 6, 2015 · 1 comment

Comments

@Joshua-Ronan-Phillips
Copy link

Your way of how to use:

var React         = require('react');
var ReactDOM      = require('react-dom');
var PointerTools  = require('react-mouse-pointer-tools');
var rootElement   = document.body.getElementById("wrapper");

ReactDOM.render(
  <PointerTools color="pink" showRulers={true} />,
  rootElement
);

FCScripters way:

After installation add the following to your main js file i.e. app.js

var Countdown = require('react-the-final-countdown');
And add the Countdown component where you are returning your HTML:

<Countdown min = {3} msg ="Close the bloody fridge" afterUnmount = {this.afterUnmount}/>

I can't work out which way is correct or if they both are?

@thegsi
Copy link

thegsi commented Nov 6, 2015

Sorry, raised issues on the other repo by accident. I think that:

Either make clear you are dealing with the dom or change code to be added to react project itself. It took me ten minutes to see the magic.

eg var rootElement = document.body.getElementById("wrapper");
ReactDOM.render(
,
rootElement
);

or var rootElement = document.getElementById("wrapper");

React.render(
,
);

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

No branches or pull requests

2 participants