4 ms·
Yes, and that's a great use case for it. But you can also use your existing Backbone Views (if they have some nice, say, formatting or data-munging-for-display
by jashkenas 13y ago
Yes, and that's a great use case for it.
But you can also use your existing Backbone Views (if they have some nice, say, formatting or data-munging-for-display logic in them) and simply replace your render function with React.
The next step you can take is replacing your HTML templates with React's JSX templates, if you'd like...
- rubiquity 13y agoThanks for replying and for your work on CoffeeScript and Backbone. I might give this a try as I love Backbone's Model layer. I think I like the second approach you suggested better. That might almost turn the Backbone.Views into ViewModels, right? I'm still up in the air on how I feel about the whole JSX thing but I'm willing to give it a try.
- SkyMarshal 13y agoFwiw JSX is totally unnecessary, and more verbose anyway. Using React without JSX feels almost like using HAML or something for your HTML.