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
0 answers

fluidbootstraptheme Passing data from controllers to view Configuration section

I am using the fluidbootstraptheme because is easy to use, extend, etc... until now that I am trying to pass data from the controller to the view Configuration section. View Glyphicons.html:
0
votes
0 answers

Reactjs: Why my props aren't being updated?

I need to update my props in order to render new data. I have a view with a list of dealers for a casino game. That list is OK, the problem comes up when you try to add a new dealer, the dealer doesn't display in the view, yo have to reload the page…
Non
  • 8,409
  • 20
  • 71
  • 123
0
votes
1 answer

Flux Stores: Why extend EventEmitter.prototype?

Every offical Flux example I can find uses this pattern for creating a store: var MyStore = assign({}, EventEmitter.prototype, { ... }); I don't understand why we're assigning methods directly on the MyStore object when we could just inherit…
wolverdude
  • 1,583
  • 1
  • 13
  • 20
0
votes
1 answer

Maintining state on components in a Flux environment

We're using React and Flux (via the Alt implementation). The state is maintained on the stores and is passed to the view components as props, which is nice for data. I found myself, however, maintaining state such as isOnHover and similar UI…
Shahar
  • 478
  • 5
  • 17
0
votes
1 answer

Reactjs: Toggling the class of a different component

Tools: Reactjs and vanilla flux. I'm making an off-canvas slider in React. The button and the sliding menu that it controls live within separate components. This makes state changing within the component(like many examples I've seen) not…
Nick Pineda
  • 6,354
  • 11
  • 46
  • 66
0
votes
1 answer

Grasping the theory behind Flux in React

I've been applying a Flux-like architecture to my React app, and am wondering if the app state is really meant to be kept in the store(s) rather than components. It seems like there are some scenarios where it might be good to have some components…
ffxsam
  • 26,428
  • 32
  • 94
  • 144
0
votes
2 answers

React and Flux - how to tie view to store data

I started learning React with Flux and I am having some trouble. I have a store and two views (components) and I would like to update one view when the store data changes, but I'm not sure how to tie the two together. What happens is this: I click a…
SoluableNonagon
  • 11,541
  • 11
  • 53
  • 98
0
votes
1 answer

How to pass flux to react-router 1.0.0

http://fluxxor.com/examples/react-router.html#/ This shows how to do it for the old version of React-router. Does anyone know how to pass flux as a prop to your top-level component in react-router 1.0.0? I saw somewhere in the docs that in…
user911625
0
votes
0 answers

Limiting React render calls in components?

I have an UI built in Flux/React that mimics an OS windows system. User can move, minimize, and resize windows but also drag'n'drop icons between windows. I have main Desktop component which polls LayoutStore and builds children based on layout…
konrad
  • 1,664
  • 2
  • 17
  • 36
0
votes
1 answer

Show notification before and after sync action with Flux and React

I have a task - to implement notifications/alerts on react+flux. Imagine the next situation user clicks on the button. After that I'm firing an action - for example "CALCULATE_ACTION" then I catch it in the MainStore. While processing this action in…
2rist
  • 1
0
votes
1 answer

ReactJS Flux multiple requests to restAPI on render

I just started to explore ReactJS with Flux. I've been managing to initialize the API service to get initial Data but on the flow I have some problems when I render the component. The initial json contains a thumbnail_id and over this ID I should…
fefe
  • 8,755
  • 27
  • 104
  • 180
0
votes
1 answer

Where can I put the complicated logics when using reactjs to be easy to test?

Where can I put the complicated logics when using reactjs to be easy to test with Jasmine? Should I put them in Reactjs components? Should I create a separated JS module and include it to components by props? Should I put it in Flux store?
0
votes
1 answer

Flux events to/from store?

I am trying to wrap my head around Flux, and I actually got a contrived example working, but I'm a bit confused about the event flow. Let's say I define an action called TestAction. My view has an onClick that emits that…
XeroxDucati
  • 5,130
  • 2
  • 37
  • 66
0
votes
1 answer

Can TypeScript exports be overloaded?

I found some weird typescript syntax in looking at flux, that isn't making any sense. For example; class Action { private _source: Action.Source constructor( source: Action.Source ) { this._source = source } get source() { …
XeroxDucati
  • 5,130
  • 2
  • 37
  • 66
0
votes
1 answer

React Flux action which depends on the result of another action

I'm trying to handle an action which depends on the result of another action. I have a form component to CREATE/UPDATE 2 entities : Submit form First call APIAction.save and save "parentEntityData" Second call APIAction.save and save…
AniZ
  • 21
  • 1
  • 1
  • 4