Questions tagged [flux]

An application design paradigm used as a replacement for MVC, pioneered at Facebook by Jing Chen

Flux is an application design paradigm used as a replacement for the more traditional pattern.

It complements React's composable view components by utilizing a unidirectional data flow. It's more of a pattern rather than a formal framework, and you can start using Flux immediately without a lot of new code.


Popular implementations :

1614 questions
0
votes
1 answer

Flux react, can an action get a store?

Is it an anti-pattern that an action use something like store.get() ? I'm not sure this is a good idea to do that
François Richard
  • 6,817
  • 10
  • 43
  • 78
0
votes
1 answer

Is there any other elegant way to do function binding?

I use ES6 class syntax, React.js and Flux for my project. This is a piece of the code: export default class Splash extends React.Component { constructor() { super(); this.state = Comm.reqSplash(); } componentDidMount(){ …
0
votes
1 answer

Centralized function to delegate form onSubmit to Flux Actions

I have a react app with many different forms I'm looking to not have to write the same code over and over for each form, and I'm looking for a simple way to centralize the onSubmit() handlers for all forms. From a central location I can trigger the…
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
0
votes
2 answers

Fluxible and Navlink routing error

I m actually developping an application using fluxible and I m facing a problem using route parameters. Actually, I m having this render function : render() { return (
mfrachet
  • 8,772
  • 17
  • 55
  • 110
0
votes
1 answer

How to handle a Flux store for single / multiple data rows - according to read permissions?

For example - a simple user can read its own data but an admin can read all users data. Can I use a single Flux store, called 'UserStore', that will hold an array which will sometimes contain a single data object and sometimes multiple data objects…
Amit Kaspi
  • 835
  • 2
  • 10
  • 19
0
votes
1 answer

Should I use separate Flux store for each DB table?

I'm creating an application that stores user's data in multiple database tables - info, payments and booking (this is a booking system). In 'info' table I store the user info such as email, name, phone, etc..., In 'payments' table I store his…
Amit Kaspi
  • 835
  • 2
  • 10
  • 19
0
votes
1 answer

Flux Store and actions with temporary data

Note: This is a follow-up question of https://stackoverflow.com/questions/32536037/flux-store-collection-by-criteria-vs-single-item but it is independent to understand and answer. Imagine we have an application for managing (CRUD) Tasks. One…
Martin Ždila
  • 2,998
  • 3
  • 31
  • 35
0
votes
1 answer

React - How to perform fast re-rendering in a distributed system

So I'm coding in React, and as far as I understand, every time a user make a local update in a realtime distributed system(such as Firebase, which I'm using) there needs to be a call to update first Firebase, and then if successful, a new object…
Nick Pineda
  • 6,354
  • 11
  • 46
  • 66
0
votes
1 answer

Flux - How to initially load Store data with asynchronously fetched data

Using: Vanilla React and Flux Firebase I'm trying to keep my store synced with realtime updates and so I've been following the instructions of this article Handling Synchronized Arrays with Real-Time Firebase Data I've placed a call to a the…
Nick Pineda
  • 6,354
  • 11
  • 46
  • 66
0
votes
1 answer

React Action Callback do transition best practice

Case is that I add a new Item by click to my user over an action. When the Items is added the ActiveItemStore will be updated and I want then navigate to the active Item. But currently the transition is called before the Store is updated. Current…
Alexander Schranz
  • 2,154
  • 2
  • 25
  • 42
0
votes
1 answer

How make a composite xhttp request using react and flux?

What is the best way to manage a "multiple request" using react+flux. I'm using a file upload component that manages it's own request. I have more than one in the form. I need to ask for the upload components to make their requests and save my form…
Bruno Reis
  • 326
  • 2
  • 7
0
votes
2 answers

How do I reuse an object used by a number of stores?

I'm developing a react native application using flux which has a number of components and a number of stores. The application uses a javascript SDK which authenticates once against an online rest API. The SDK object returned is then authenticated…
tooba
  • 551
  • 5
  • 22
0
votes
1 answer

reactjs, get state and passing it as param without changing it

The title is no really clear but my question is pretty simple. I'm using flux pattern. I have an event handler inside a reactclass, this handler takes an input from the user. What I'm doing is taking this input and pass it to an action (then the…
François Richard
  • 6,817
  • 10
  • 43
  • 78
0
votes
1 answer

Can't bind React element to event listener

I have this code (edited down to the relevant part): main.js import { mouseDownEvent } from '../common'; export default class MyComponent extends React.Component { componentDidMount() { this.refs.btn.addEventListener( 'mousedown', …
Fela Maslen
  • 2,022
  • 3
  • 25
  • 46
0
votes
1 answer

Setting up react-router in a Flux application

I have a React application where main.js calls app.js--which acts as a parent component--as can be seen here: React.render(, document.getElementById("main")); Now I need to set up React Router so that app.js will handle routing within the…
rosnk
  • 1,068
  • 1
  • 14
  • 36
1 2 3
99
100