-
Notifications
You must be signed in to change notification settings - Fork 32
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
Remove blaze-html-templates #13
Comments
I think it's just easier to maintain very long HTML static pages, and I think this project was just showing people you can mix both if you wanted to slowly convert your app. I could be wrong though. |
Great comments. When I first built it Blaze was required (pre 1.2) and I was very familiar with it (actually the React package didn't even exist then lol). However 20/20 hindsight and with 1.2 here and React 0.14 almost here I think the best thing is to use the new 'stateless' components and paste in the HTML to the render method and do a find/replace to change This allows you to remove Blaze and jQuery from the client which would drop download times. As Brandon mentioned at the least it's a good example of how you can refactor a meteor app. I would be happy to take a PR to convert the 'pages' to react 😃 I'm so swamped currently I won't be able to get to it for months. I think it would be best to leave this open for new users to see 👍 |
@jakobrosenberg @brandonmikeska - i'm aiming to close this issue by converting the blaze components to stateless components in an upcoming screencast. This might also be good to show people how to convert Blaze apps to React. |
I just built a "Hello world" app in Meteor 1.3 using React. I removed blaze-html-templates and gave it a go. If I mounted my component directly to document.body, it would run fine. But I would get an error in the console if I tried to mount the component to a div. A quick look at the source showed that the div wasn't even there. Reinstalling blaze-html-templates solved the problem. |
I had the exact same problem @joemaffei! Removing blaze-html-templates caused the error
And the div on which I mount the primary react component could not be found with document.getElementById(). So you could call this module a required dependency for meteor to run. |
The solution to this is to |
Are there any benefits in using both React and Blaze? It increases the app size and feels less "clean".
The text was updated successfully, but these errors were encountered: