Questions tagged [aurelia-store]

15 questions
4
votes
1 answer

Aurelia change state twice in one action

I am developing with aurelia and using aurelia-store for app state management. On loading data from server, I want to change an isLoading field true/false to show mask on related components. So I have defined a property in my state isLoading (for…
Mohammad RN
  • 131
  • 10
3
votes
0 answers

How do I store navigation in aurelia store?

How can I store navigation and clicks (the router state changes) with aurelia store? Why doesn't it do this out of the box?
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
3
votes
1 answer

State is always undefined when using the @connectTo decorator in a config pipeline step in Aurelia Store

I have an Aurelia app using Aurelia Store. I'm having some trouble when using the @connectTo decorator in an Aurelia pipeline step. I have added the following step to my config pipeline: config.addPipelineStep('authorize', AuthorizeStep); And this…
ViqMontana
  • 5,090
  • 3
  • 19
  • 54
2
votes
1 answer

calling a function on a bound property change in aurelia

I have this viewmodel, and all the code works @connectTo({ selector: (store) => store.state.pipe(pluck('domain')).pipe(pluck('games')), target: 'games', }) @connectTo({ selector: (store) =>…
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
2
votes
2 answers

Aurelia store - UI indicator that state is changing

I'm trying to refactor a Aurelia app to use the Aurelia Store plugin rather than a singleton class which is injected to all my viewmodel classes. In my current app there are a bunch of service classes which make ajax calls to fetch data from web…
jcaddy
  • 501
  • 4
  • 17
1
vote
1 answer

How to correctly return array in redux state, if the array did not have to be updated in the reducer?

I am using the aurelia-store state management library for managing state. This question is not specific to Aurelia store, but actually to redux best practices in general since Aurelia store is very much the same thing. I have an action that fetches…
Loupi
  • 550
  • 6
  • 14
1
vote
0 answers

Which is the best approach to write a reusable component / customElement in aurelia?

I need to create multiple tables of same html structure but data and columns are different for each table. So I want to create one table component which has common html structure and can get columns and data as parameter , I'm not sure which is the…
RS17
  • 773
  • 1
  • 9
  • 23
1
vote
0 answers

Accessing nested object returns empty array

I'm retrieving data from api and storing it in a sharedState. When i'm trying to access this data like below it seems to return the correct. There is one object in the dashboard array with name field. console.log(newState.profile) returns: However…
Peter Pik
  • 11,023
  • 19
  • 84
  • 142
1
vote
1 answer

Aurelia store connectTo never sets target property

I set the aurelia-store up as per the docs; in the main.ts at the bottom of all the plugins (from the skeleton app with dotnet core) I have as the last plugin defined: aurelia.use.standardConfiguration() .plugin(PLATFORM.moduleName('aurelia-store'),…
JoeWarwick
  • 105
  • 2
  • 8
1
vote
0 answers

Using Aurelia Store what is the best way to copy your state within Actions?

What are some ways in which to deep clone my state inside an Action? Possible solutions I’ve seen are Immer.js, JSON.parse(JSON.stringify), or create a recursive function which does a deep clone. I was even thinking of recreating what Redux does and…
Evan Larsen
  • 9,935
  • 4
  • 46
  • 60
1
vote
1 answer

How can I import the Typescript Subscription type from the Aurelia Store Subscribe method?

I am following the documentation for Aurelia Store on how to subscribe to the stream of store changes. When I import the typescript Subscription type from rxjs I get a typescript compilation error: TS2322: Type…
Evan Larsen
  • 9,935
  • 4
  • 46
  • 60
1
vote
1 answer

Events not firing when value changes in Aurelia app

I have an Aurelia app using Store to manage state between components. In my dropdown component I have validation (not framework validation, just code which should get invoked in the ViewModel on change) which should fire when the value…
Vinyl Warmth
  • 2,226
  • 3
  • 25
  • 50
1
vote
1 answer

How to observe/subscribe to changes in the state in Aurelia Store?

I have a property selectedOption on the state of my Aurelia Store, which can be changed via actions. I want to observe/subscribe to any changes to this property on the state. My problem is the subscription within the BindingEngine doesn't work…
ViqMontana
  • 5,090
  • 3
  • 19
  • 54
0
votes
1 answer

Performing a state persistance in Aurelia Store

We have a basic app state that needs to be persisted upon the browser refresh. similar to vuex-state-persistance plugin. Here is the basic state code that needs to be persisted. export const initialState = { user: { uuid:…
Kiran Maniya
  • 8,453
  • 9
  • 58
  • 81
0
votes
1 answer

Aurelia store - property 'pluck' does not exist on type 'Observable<{}>'

I've got an Aurelia CLI (0.33) application (Webpack 4, Typescript) and using aurelia-store. main.ts includes import { initialState } from './state'; ... aurelia.use.plugin(PLATFORM.moduleName('aurelia-store'), { initialState }); My…
vidriduch
  • 4,753
  • 8
  • 41
  • 63