mystor / meteor-routecore

Client and server side rendering/routing powered by React
84 stars 6 forks source link

onClick doenst work #28

Open eriCCsan opened 9 years ago

eriCCsan commented 9 years ago

I was searching on every site ... no result was fix my problem. Can Someone help me ? Its just a basic example but it didnt work. Why? The Programm is rendering well but nothing happens .. :-(

/** @jsx React.DOM */

RouteCore.bindGlobals();

var Clicker = React.createClass({
    handleClick: function(e) {
        console.log("click");
    },
    render: function() {
        return (
            <button onClick={this.handleClick}> Click me</button>
        );
    }
});

var Page = React.createClass({
    render: function(){
        return (<Clicker />)
    }
});

RouteCore.map(function () {
        this.route('/page', function() {
            return (<Page />);
        });
});
rozzzly commented 9 years ago

What does the markup look like?