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

React - how can I get updated data to show in my table?

I need to be able to update the values in my table rows and then have those new values show in the cells. How would I go about doing this? Here is the code I am currently working with: Main Table Component import React from 'react'; import…
BeeNag
  • 1,764
  • 8
  • 25
  • 42
3
votes
1 answer

Dynamic Initialization of Flux Stores

How is a Flux based system meant to handle an uninitialized store. For a variety of reasons, it makes sense to only initialize a store when that data is first requested. If I'm designing a Facebook Profile, I don't need to load the list of…
Jake Haller-Roby
  • 6,335
  • 1
  • 18
  • 31
3
votes
2 answers

Does React.js have a basic Flux implementation?

I am new to React.js and I am enjoying it a lot. I came across the Flux architecture while reading the React.js documentation. I understand that Flux is just a pattern and that there are many Flux implementations out there – including Facebook's…
Imran Latif
  • 985
  • 8
  • 21
3
votes
0 answers

How to test stores/actions?

I need to test the alt store; for which I have raised an action using alt dispatcher and trying to listen it at the action listener. But I got my alt object as undefined. Action Class: var alt = require('../alt'); var LocationSource =…
3
votes
2 answers

React child element calling the parent element, on value

I'm trying to create a MessageBox(Modal Box) element which gets inputs to form the Modal Box, The close method in MessageBox somehow doesn't call the parent close and inturn get the Modal disappear, any help please ?? export default class MessageBox…
user1776757
3
votes
0 answers

How can I get react-router to match against redirected url and show the appropriate component?

I'm using an external authentication service in my app and after the user is authenticated, the service redirects the user to localhost:3045/#access_token=xxxx(with the idToken). How can I get react-router to match against redirected url and show…
imuzz
  • 51
  • 4
3
votes
2 answers

What is causing the web page to reload?

I have built a simple service to compose a series of tweets, http://tweetsmart.in using React and Flux. I am facing a weird error where the page reloads when the user signs in and clicks on the tweet button for the first time. If the tweet button…
shashi
  • 4,616
  • 9
  • 50
  • 77
3
votes
1 answer

How addChangeListener works in Facebook React Todo example

All: I am pretty new to React. When I follow its TodoMVC example, there is one question confuses me so much: Inside TodoApp component, it registers its handler using TodoStore.addChangeListener: componentDidMount: function() { …
Kuan
  • 11,149
  • 23
  • 93
  • 201
3
votes
2 answers

How to have JSX validation and highlighting in .js file in VSCode?

I am trying to work on a react with flux project using VS Code. The VS Code will give errors and warnings for the JSX in the .js files. I keep the .js extension instead of .jsx as I want the intellisense from VS Code. How can I have JSX validation…
Y.S
  • 31
  • 3
3
votes
3 answers

Refresh logic in react component or flux/redux?

So i'm fairly new to React and I can't wrap my head around a concept on how to re-render a main component based on another component. Lets say we have a to-do application and a to-do item can have a state (new, running, closed). We are displaying…
user1322163
  • 109
  • 1
  • 9
3
votes
2 answers

How do I use cloudinary with ReactJS?

I'm currently building an app using reactjs on the flux architecture. I’m trying to use cloudinary for node (npm installed) to handle image uploads but when I try to call the uploader function, I get an error post_request.setTimeout() is not a…
Cent
  • 871
  • 7
  • 16
3
votes
1 answer

How to fire Flux actions for RelayMutations

In other words, How can I get local state (flux stores such as ModalStore, HistoryStore etc) to update upon relay mutation. Only solution I could find is to use callbacks to fire flux actions. However this becomes very redundant and dangerous, since…
Oguz Bilgic
  • 3,392
  • 5
  • 36
  • 59
3
votes
2 answers

How to wait to render view in react.js until $.get() is complete?

Hello I'm writing a chat client in reactjs and want to render my components with data retrieved from a REST call. However, my component is rendered before the REST request returns with data; this causes errors as I am calling this.props within my…
laycat
  • 5,381
  • 7
  • 31
  • 46
3
votes
1 answer

Flux- infinite scroll: i cannot think of how to stick to unidirectional data flow

i am trying to implement an infinite scroll from many items that i get from the server, but i cannot find any proper way to keep the flux architecture design rules. the idea is: on the first load, i get a full item list from server (only id's), then…
avieln
  • 75
  • 3
  • 5
3
votes
1 answer

How to design standalone module in reduxjs?

Say we have a CountryPicker which on mount will send a request to server to load country list then display it, user can pick a country and it will dispatch a PICK_COUNTRY action and update UI correspondingly. Also it will display some helpful…
jasonslyvia
  • 2,529
  • 1
  • 24
  • 33