4 ms·
Yes, it's pretty much unnecessary to include React and a framework like Angular, Ember, or Knockout in the same project. And of course React works well with RES
by applecore 11y ago
Yes, it's pretty much unnecessary to include React and a framework like Angular, Ember, or Knockout in the same project. And of course React works well with REST and GraphQL APIs for communicating with a backend. React is definitely a better alternative to a heavyweight framework like Angular for new projects.
- tptacek 11y agoI can't imagine using React and Knockout in the same project.
- scoot 11y agoAs a relative newcomer jo JS frontend development, is there a canonical JS REST client library that works well with React / Flux, or do I have to write that myself?
- woah 11y agoFetch is really easy to use, and is native in modern browsers. There are several polyfills as well. It eliminates the need for any libraries.
- pvg 11y agoFetch looks interesting but as far as I can tell, it's an in-progress standard with no support on any version of Safari or IE or any mobile browser whatsoever. Seems like it has a bit to go before it being 'native in modern browsers'
- callum85 11y agoYou can polyfill it in those browsers. Just use polyfill.io, or if you prefer, manually feature-detect it and if necessary load Github's fetch polyfill, which is good: https://github.com/github/fetch https://github.com/github/fetch
- scoot 11y agoThanks, appreciate the pointer - the idea of adopting something potentially a future standard through a polyfill is appealing. @pvg I take your point about lack of browser support, but that's what polyfills are for after all! :) In the meantime since asking I also came across restful.js (github [1], blog [2]) - it's new, but looks like a good framework-neutral alternative, if a little heavy at 27K minimised/uncompressed. Edit: Actually, fetch.js + es6-promise-min.js = 26K, so not much in it. [1] https://github.com/marmelab/restful.js https://github.com/marmelab/restful.js [2] http://marmelab.com/blog/2015/03/10/deal-easily-with-your-rest-api-using-restful-js.html http://marmelab.com/blog/2015/03/10/deal-easily-with-your-re...
- sgberlin 11y agoMaybe "superagent". Client side and node.