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
0
votes
1 answer

Global window Actions in Flux pattern

Background I'm looking to implement a flux store to manage async 3rd party scripts (current use case is the google maps API) I want to be able to have my maps component check with the store for the api state and manage external scripts in this way…
Sam Ternent
  • 281
  • 1
  • 4
  • 14
0
votes
1 answer

Flux Store Data pointers vs Dependencies

So I here is the case: say you have chat app written in the flux way, but now I also have a UserStore that keeps track of all the connected users. A Message has a text and the id of the user that sent the message. Users can change their name, so if…
Acek
  • 133
  • 1
  • 9
0
votes
1 answer

Multiple components catches the save store event

I have an input component that gets url as input and resolve it (resolve=get somehow a preview for that url): var resolver = require('resolver'); var UrlResolver = React.createClass({ statics: { storeListeners: { …
Naor
  • 23,465
  • 48
  • 152
  • 268
0
votes
1 answer

a scenario flux doesn't support

I am using flux architecture with React and I have an issue I don't know how to handle. I need to write a logic that will listen to dispatched action (like a store) and will trigger an action in case the payload contains a specific value. For…
Naor
  • 23,465
  • 48
  • 152
  • 268
0
votes
1 answer

Simple push server for prototyping

I want to make a live prototype to demonstrate transactions between two users in different browsers. It should keep the state of the UI in sync between two sessions when each user performs an action. For instance: when one user presses purchase in…
0
votes
1 answer

In Flux, how to get async errors (i.e. xhr) back to my view components?

Application data lives in stores Application (ui) state lives in stores (there are different opinions tho) When the user now submits a form and the server returns a validation error, hot do I get this error back to the view component (the form)?…
Aron Woost
  • 19,268
  • 13
  • 43
  • 51
0
votes
1 answer

Should stores be used to do simple UI changes in React + Flux?

Say I have the following component structure: App DivContainer1 Child1 Button1 Child2 Button2 DivContainer2 AComponentHere When I press Button1, I want to replace the contents of DivContainer2 with…
timetofly
  • 2,957
  • 6
  • 36
  • 76
0
votes
1 answer

How to determine which react view should handle a store event

I'm using ReactJs together with Flux. So I have views, action creators, a dispatcher and stores. I created a reusable search component that uses a 'searchActionCreator' (which calls a search API). Finally the 'searchStore' will receive the search…
Björn Boxstart
  • 1,098
  • 1
  • 12
  • 25
0
votes
2 answers

Dynamically generated input textfield value setting issue in ReactJS

I have dynamically generated textfield in Reactjs. The input textfield treated as separate component. When i try to set value in dynamically generated textfield, I get only last input value. All other input values are over write. We can use SWITCH…
0
votes
1 answer

Isomorphic React, unable to render as string because I haven't got a valid react Element?

I'm having some serious troubles in getting react set up with rendering on the server side.. Here are my relevant files to the problem I'm having: https://bitbucket.org/snippets/imattacus/g9r6 I have been following tutorials online and I'm just…
imattacus
  • 354
  • 1
  • 3
  • 12
0
votes
2 answers

What are the common approaches to updating a backend server when using a reactjs client?

Front end clients built using reactjs can appear to modify data but in order for this modifications to persist, the modifications need to be stored on the backend. However, unlike traditional client-server apps, the data being rendered on the…
takinola
  • 1,643
  • 1
  • 12
  • 23
0
votes
2 answers

Use React to create a 100K multi-player tile game

I'm learning React. I'd like to create a game with a basic tile-board (like here http://richard.to/projects/beersweeper/ but where tiles can have two states ('available' or 'already clicked'). In terms of speed, React looks interesting as with its…
Mathieu
  • 4,587
  • 11
  • 57
  • 112
0
votes
1 answer

Update store with props in reactjs

I am following flux architecture and I want to know if it is possible to update the store based on the props received ? If yes what is the best method to do so ?
alwaysLearn
  • 6,882
  • 7
  • 39
  • 67
0
votes
2 answers

Should action talk with store?

I am using react with flux architecture and I have a problem I face it. I need to create an action that gets a user id and fetches the user. Here is the code: var createAction = require('common/scripts/actions-helpers/create-action'), resource =…
Naor
  • 23,465
  • 48
  • 152
  • 268
0
votes
1 answer

Closed: ReactJS controlled input element not updating

I am new to React and still trying to wrap my head around all the concepts involved. However, I just implemented a controlled input component to test the waters and it doesn't update on input. Using ImmutableJS Record and ES6 (via BabelJS). Here's a…