Questions tagged [alt.js]

A library for managing data within JavaScript applications.

A library for managing data within JavaScript applications. http://alt.js.org

28 questions
0
votes
1 answer

What is the necessity of actions in Alt.js

Iam new to react. I have been reading Alt.js and flux architecture since few days. Few conceps I am not able to understand. From a component we access store and get the data. If it is server side request we have async Data Sources which is binded to…
K2A
  • 172
  • 2
  • 7
0
votes
1 answer

Is setState() optional for updating the state in Alt.js store?

Yeah, I know that setState() updates a Store's state and emit a change event to all subscribers, but I find out that not everyone uses it and omit it when they update the state. For example in the following alt-todo repo, they don't use…
Jordan Enev
  • 16,904
  • 3
  • 42
  • 67
0
votes
1 answer

Listen for a specific Store property change

I have a Component which initial state is set to be equal to a Store state. Also the Component is subsribed to any change that occurs in the Store. // Inital component's state is set to be equal to a Store state constructor(props) { …
Jordan Enev
  • 16,904
  • 3
  • 42
  • 67
0
votes
2 answers

React/Alt - avoid dispatching within a dispatch when responding to user input?

I have a component that takes user input. When they save, I use an action to update a store's state In response to this new information, a results component needs to run an async operation and then respond when new information comes back. No matter…
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
0
votes
1 answer

Disable and re-enable button on single action

I need to disable and re-enable a button during the async call. I am only able to disable it. If I add code to re-enable it is ignored. I acknowledge I may not be asking the right question. I have a function with a button "Action":
Joe Essey
  • 3,457
  • 8
  • 40
  • 69
0
votes
1 answer

React + Alt: Use data from multiple stores to make a request to DataSource

I am working on an app using React with Alt flux implementation. Currently, I'm trying to figure out the best way to use data from multiple Alt stores to compose a request to the backend. Say, I have a SheetDataStore, FiltersStore and a…
Gleb Kostyunin
  • 3,743
  • 2
  • 19
  • 36
0
votes
1 answer

How to update state after successful request with sources in alt.js?

I am fairly new to alt.js and have a question regarding updating the state in the success handler. Let's say I have a UserStore and want to delete one User. I fire the delete user action with the id of the user which is ought to be deleted. The…
MoeSattler
  • 6,684
  • 6
  • 24
  • 44
0
votes
1 answer

May I use alt stores in multiple components in react?

For example, in one page, I want to use UserStore in MANY Components. Is it okay to use that way? If components are children of UserComponent, must I declare {...props} in every children?? or is it okay to use duplicate, overlay injection in many…
bsdo64
  • 216
  • 2
  • 12
0
votes
1 answer

React CRUD operations always using state

I am building a React app using altjs as my Flux implementation. When I try to create/delete an item from the front end, no matter what I pass as a parameter to the create/delete function, it always ends up as passing the entire state. For example…
erichardson30
  • 4,984
  • 8
  • 26
  • 47
0
votes
1 answer

ReactJS - store.getState() undefined

I am getting data from an external api using the altjs implementation of Flux. The api call works fine from the action, is returned back to the store, and then the onChange() function is triggered in my component. I try to set the state from the…
erichardson30
  • 4,984
  • 8
  • 26
  • 47
0
votes
1 answer

What is the process for reporting data back to a parent component using react?

Consider two react components. One is a form component. The other a fancy date picker I have rolled myself. The date picker should make the currently selected date available to it's parent component. What is the best way to do this? Should the date…
Stewart
  • 3,023
  • 2
  • 24
  • 40
0
votes
1 answer

React Flux (alt.js) - not passing data from multiple stores

I appear to be having difficulty comprehending the documentation on handling multiple stores. This is in my APP component ... static getStores() { return [InventoryStore, CompanyInfoStore]; } static getPropsFromStores() { return { …
user1177440
0
votes
1 answer

Bug with Alt.js and react. State is not kept

I'm using this class to display and filter a list. This class also trigger a search. My problem is it seems that the setState function is not immediate. FriendActions.getSearchList(this.state.search); If I comment this actions. The console.log will…
bokzor
  • 413
  • 7
  • 19
1
2