Closed merlinstardust closed 8 years ago
In core/components/postlist
we use React's stateless components. With that, even though we don't use React on the code, it'll add when converting this code to normal JS.
That's why we need it.
Rendering
It's rendered in routes. See: https://github.com/mantrajs/mantra-sample-blog-app/blob/master/client/modules/core/routes.jsx (We use react-mounter for that)
Thanks @arunoda!
Why is
React
imported in some files but not used?Why does
core/components/newpost.jsx
useReact.createClass
butcore/components/postlist
andcore/components/post
do not?In the Meteor tutorial, the App gets rendered with
React.render(<App />, document.getElementById("render-target"));
, but in Mantra, this code is nowhere. So I would assume it gets replaced byapp.init()
. But inmantra-core
, there is noReact.render
. So how is it being rendered?