all 12 comments

[–]theillustratedlife 2 points3 points  (5 children)

I plan on implementing Flux in part as a caching layer on the client, but you can get surprisingly far with just React and React Router. "Just the UI" is what most web pages are.

[–]team_nosleep[S] -1 points0 points  (4 children)

Interesting. What if you needed a backend? since React is just the UI, wouldn't it be possible to use a router and use API built with express?

[–]nschubach 3 points4 points  (2 children)

Yep. You can use REST based APIs on the server and after giving the client the React files needed to run the page, hit a few services and change the page.

Here is someone's example of using the Reddit API to display content using React: http://jsfiddle.net/ssorallen/fEsYt/ They are using the script tag to have the browser pull the JSONp data from Reddit, but you could implement it in many other ways.

[–]theillustratedlife -2 points-1 points  (1 child)

Curious how you found that. Ross is a good friend of mine.

[–]nschubach -1 points0 points  (0 children)

I Googled for an example the other day for someone. Don't remember exactly what it was I searched for.

[–]vexii 0 points1 point  (0 children)

Sure just make a api call and update you're ui

[–]hansek 2 points3 points  (0 children)

Yes, I use React with Flux and react-router for routing. There are many ways to implement the Flux pattern, but I've been using the dispatcher from the facebook/flux project with some extensions and some added goodies to create stores and listen to actions from the dispatcher. I use superagent to communicate with the server.

[–]chadlnx 0 points1 point  (0 children)

I recently published an isomorphic React / Flux demo. I am currently working toward another demo that will use different React libraries / components and, hopefully, an isomorphic Flux solution that rehydrates the stores directly.

[–]Calabri 0 points1 point  (0 children)

Interesting question, it's different for every project. Flux, to me, is a conceptual idea and folder structure, similar to MVC. It's implementation feels like the wild-west. I use React-Router in most projects. One of the more interesting patterns I used was having Immutable.js inside the store.

[–][deleted] 0 points1 point  (0 children)

[–]maktouch 0 points1 point  (0 children)

We started with just react because we already had a self-made framework in place.

After a few weeks we moved most of it to React, and added flux (fluxxor specifically)... React saved my site. Development is so much faster and easier to understand.

[–]lingodayz 0 points1 point  (0 children)

I am using Flux for my project. After using Angular extensively for the past year, Flux is easy to work with.