Questions tagged [reactjs-flux]

Flux is the application architecture that Facebook uses for building client-side web applications with React. It complements React's composable view components by utilizing a unidirectional data flow.

Flux is the application architecture that Facebook uses for building client-side web applications with React. It complements React's composable view components by utilizing a unidirectional data flow.

Flux applications have three major parts: the dispatcher(s), the store(s), and the view(s) (React components).

Flux eschews MVC in favor of a unidirectional data flow. When a user interacts with a React view, the view propagates an action through a central dispatcher, to the various stores that hold the application's data and business logic, which updates all of the views that are affected. This works especially well with React's declarative programming style, which allows the store to send updates without specifying how to transition views between states.

###Some popular implementations of Flux


Related tags

822 questions
9
votes
3 answers

React/Flux way to handle permission sensitive actions with login flows

I have been playing with React/Flux, and I am having trouble wrapping my head around the 'Flux Way' for handling permission-sensitive actions. Overarching question: When a non-logged in visitor attempts an action that requires he/she to be logged…
mattmattmatt
  • 965
  • 3
  • 15
  • 29
9
votes
2 answers

Confused about React's Flux architecture - waitFor

I have my own opiniated way on how to use React and am building my own framework, inspired by Om. I am implementing something a bit similar to the Flux architecture, with stores that can update themselves on some events. What I am not sure to…
Sebastien Lorber
  • 89,644
  • 67
  • 288
  • 419
9
votes
3 answers

How do I run some config before every Jest test run

I'm writing tests for a React application which makes use of Fluxxor to provide an event dispatcher. Making that work requires telling Jest not to mock a few modules which are used internally, and are provided by Node itself. That means I can't just…
Jon Wood
  • 2,589
  • 1
  • 20
  • 17
8
votes
1 answer

how to use nested routing with react-native

I am using react-native-router-flux for my apps main navigation. I need to setup a nested router. I have a map component that has a side bar with a List of Territories. When I click on a row I need to switch to a view that has the List of…
texas697
  • 5,609
  • 16
  • 65
  • 131
8
votes
1 answer

Nested-loop React components with Flux, change-listeners on parent or children?

I'm building a Word Dojo clone in React/Flux. The game is essentially Boggle - you make words by clicking on adjacent letters in a grid: My React components with their source: Gameboard TileColumn Tile All of the source code can be viewed…
Joshua Comeau
  • 2,594
  • 24
  • 25
8
votes
1 answer

React-Flux: Error with AppDispatcher.register

I am trying to set up the most basic app in Flux-React. Its sole goal to is fire an Action, which gets sent through the Dispatcher to a Store that has registered with the Dispatcher. The store the logs the payload to Console. Everything besides the…
Ben
  • 5,085
  • 9
  • 39
  • 58
8
votes
1 answer

How to handle async errors in Flux?

I've been working with Flux and I'm really enjoying, but I have one point where I cannot figure what would be the best solution. I made an app that handles a list of orders, and each order in the list is divided in different components that can have…
jasalguero
  • 4,142
  • 2
  • 31
  • 52
8
votes
2 answers

React-router: Passing data through routes

I'm trying to figure out the best way to pass data through my routes. I know I can use params but there are certain types of data that don't belong in params. For example: I have an index page that displays a list of applications. Each application…
BezR
  • 503
  • 1
  • 6
  • 12
8
votes
1 answer

In Flux/React.js, where to initialize jQuery plugins?

The Flux model mandates that any changes in state initiated at the views, fire actions that work through the dispatcher and propagate down a store back to listening views. This is all nice and dandy. But what if I need to perform some DOM operation…
pilau
  • 6,635
  • 4
  • 56
  • 69
7
votes
1 answer

Flux Utils TypeError: Class constructor App cannot be invoked without 'new'

I am trying to implement a Flux Util container on the following React component: class App extends React.Component<{},AppState> { constructor(props:Readonly<{}>){ super(props); } static getStores(){ return [ArticlesStore]; } static…
Adrian Pascu
  • 949
  • 5
  • 20
  • 48
7
votes
1 answer

React Native ListView performance is too slow?

I have 113 records in my application.react native listView is taking more than 3 seconds to render all the rows. how can i make it efficient so time consumption can be minimum and app experience can be smooth. i have checked the same application in…
Waleed Arshad
  • 1,081
  • 3
  • 12
  • 24
7
votes
1 answer

React Router Navigation in multi step form

I have a react multi step form with a flux store like this: // MultiForm.js .... import LoadFile from './components/LoadFile'; import LoadPeople from './components/LoadPeople'; import Confirmation from './components/Confirmation'; class MultiForm…
user2725944
  • 85
  • 1
  • 1
  • 5
7
votes
1 answer

React event hierarchy issue

What is the best way to handle state changes in a deep node which also need to be handled by a parent node. Here is my situation:
user517153
  • 205
  • 2
  • 8
7
votes
1 answer

React/Flux - Why do I need a action-dispatcher?

I understand that I need a emit.change() dispatcher, to let all components know that something changed inside the store. But I dont understand why I need to dispatch actions rather than calling stores directly from inside the actions, .i.e. why…
Felix Hagspiel
  • 2,634
  • 2
  • 30
  • 43
7
votes
1 answer

Initial data loading ReactJS

I would like to perform some initial data loading when my first route is rendered (for example, i want to load a list of news articles) I made a component called News.js which renders the articles. The problem i'm experiencing with the FLUX model is…
Maxim
  • 3,836
  • 6
  • 42
  • 64