We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There are some js libraries defined some react components, how to use them with this project?
The text was updated successfully, but these errors were encountered:
Yes, you need to define interface to your 3rd-party component, for example:
@JSName("ReactBootstrap") object ReactBootstrapJS extends js.Object { val ButtonToolbar: ButtonToolbar = ??? } trait ButtonToolbar extends js.Object { def apply(props: js.Object, children: Seq[ReactDOM]): ReactDOM = ??? }
Sorry, something went wrong.
Could you give me an example of how to wrap react-router? I have tried for some time, but can't handle it.
The main usage is like:
var App = React.createClass({ render: function() { return ( <div> <Header /> <RouteHandler/> </div> ); } }); var routes = ( <Route name="app" path="/" handler={App}> <DefaultRoute handler={MainPage} /> <Route name="MyProjectsPage" handler={MyProjectsPage} /> <Route name="ConfigPage" handler={ConfigPage} /> </Route> ); Router.run(routes, function(Handler) { React.render(<Handler />, document.body); });
See more here: https://github.com/dujuanxian/webpanda/blob/master/app/scripts/app.js
I tried to use the approach from your previous answer, and can't get the idea.
No branches or pull requests
There are some js libraries defined some react components, how to use them with this project?
The text was updated successfully, but these errors were encountered: