News for hackers. Stuff that matters.
Re:React.js Introduction for People Who Know Just Enough JQuery by applecore on Thursday July 09, 2015 @09:11AM (#9857611)
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.
Re:React.js Introduction for People Who Know Just Enough JQuery by tptacek on Thursday July 09, 2015 @10:13AM (#9857925)
I can't imagine using React and Knockout in the same project.
Re:React.js Introduction for People Who Know Just Enough JQuery by scoot on Thursday July 09, 2015 @10:37AM (#9858053)
As 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?
Re:React.js Introduction for People Who Know Just Enough JQuery by woah on Thursday July 09, 2015 @01:37PM (#9859423)
Fetch is really easy to use, and is native in modern browsers. There are several polyfills as well. It eliminates the need for any libraries.
Re:React.js Introduction for People Who Know Just Enough JQuery by scoot on Thursday July 09, 2015 @02:54PM (#9859956)
Thanks, 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 [2] http://marmelab.com/blog/2015/03/10/deal-easily-with-your-re...

Re:React.js Introduction for People Who Know Just Enough JQuery by pvg on Thursday July 09, 2015 @02:10PM (#9859659)
Fetch 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'
Re:React.js Introduction for People Who Know Just Enough JQuery by callum85 on Thursday July 09, 2015 @06:06PM (#9861020)
You 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
Re:React.js Introduction for People Who Know Just Enough JQuery by sgberlin on Thursday July 09, 2015 @06:14PM (#9861061)
Maybe "superagent". Client side and node.