Questions tagged [mobx]

Functional reactive programming library in JavaScript.

About

MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming. The philosophy behind MobX is very simple:

Anything that can be derived from the application state, should be derived. Automatically.

which includes the UI, data serialization, server communication, etc.

Links

1876 questions
0
votes
0 answers

How to implement Web Worker using React, Typescript and Mobx?

I have a mobx store (admisionStore) which contain actions and observables, some of the actions load data from the API using Axios, but it is a long running task that slow the UI, I read about web worker and they may be helpful in this scenario. I…
Orpheus
  • 1
  • 2
0
votes
1 answer

how to manage state across multiple screens in mobx flutter?

I am very much new to the mobx and want to use it as state management for my application. so far with the online tutorial and google search I know that mobx is the state management tool similar to ChangeNotifier in the flutter and best used with…
rahul Kushwaha
  • 2,395
  • 7
  • 32
  • 64
0
votes
1 answer

Mobx observale value is null when used in useEffect hook

I am trying to get userdata from firestore based on uid obtained from authStatechanged in mobx. But when i try to access it in useEffect, it shows value is undefined but if i print its value in body it shows after slight delay. What should i fo to…
0
votes
0 answers

Mobx reaction with infinite scrolling do not fetch properly

I am trying to fetch data after I scroll down at the bottom of the element. This part is working that it fetches when I scroll, but the behavior is not correct. When it fetches, the data renders so many times and also not in right order. It looks…
IssaChii
  • 55
  • 1
  • 9
0
votes
1 answer

Flutter Modular Mobx - Observable doesn't update inside of onpress

I am new with Flutter and I am having a problem. I'm using mobx. In my view I have a button and inside of this button, I am waiting for the showDialog property to change in order to show the dialog view . However, within onpress the showdialog …
user6076
  • 15
  • 5
0
votes
1 answer

How can I fetch the data again in React Table?

I am having the following problem. In my application, I have a button and when you click it shows a pop-up with value1 and value2. You can edit them and press save or just cancel. Everything goes without a problem. But when I go to "Table" tab…
DnA_alex
  • 3
  • 1
0
votes
1 answer

TypeScript dynamic property filtering mobx observable list

I have a calendar application I am building in React using Typescript. I am currently trying to store all my calendar events in a single observable object and select an array of events based on date My events object looks like this events = { …
Jason McFarlane
  • 2,048
  • 3
  • 18
  • 30
0
votes
1 answer

How to check if current javascript/typescript object is of type of ObservableArray?

How to check if current javascript/typescript object is of type of ObservableArray ? I tried doing typeof myObject but it returns me object. I am using mobx store and one observable field of store has a array property which is resolved as…
Roshan
  • 873
  • 12
  • 33
0
votes
1 answer

question on reloading observable data in mobx upon page load

I have a typescript DataStore object that stores some data (using Mobx) from the server when I login. For example: import { observable } from 'mobx-react'; class DataStore { @observable user: User | null = null; lots more code here } The…
Marc
  • 3,386
  • 8
  • 44
  • 68
0
votes
3 answers

Error: mobx-react-lite requires React with Hooks support

I cannot launch my application. I have no clue what I am searching for. Everything seems good. In the very beginning, I tried to change my store from redux to mobx. Everything I've done is mostly about typescript babel transformation etc.…
0
votes
1 answer

Stop unnecessary component rendering

So I have this class : class Dimension { @observable name @observable label @observable active @observable color @observable data = [] } Now I have a store: class MyStore { @observable dimensions = [] constructor() { /** some…
user3467713
  • 131
  • 1
  • 11
0
votes
1 answer

what is the issue mobx Error 'Reaction[observerobserved]?

Help me pls with this issue: I'am using mobx-state-tree + React + mobx + Socket.io ,i'm writing chat for project,and using for connection socket.io From server i get chats list and then put him to mobx-state-tree store using action,then i want get…
Waker
  • 46
  • 4
0
votes
3 answers

' TypeError: [Variable].getDay is not a function

I need a time differnce in my react componenet. I have used MobX for my state management.Some Part of the code: Expiry Date :- {format(books.returnDate, 'eeee do MMMM')} Remaining Time:-…
Biraz Dahal
  • 361
  • 1
  • 5
  • 20
0
votes
1 answer

How to filter from Observable Map in React?

I have an React Component Which Consists Dropdown , the dropdown has 4 values 'requsted,all,taken,available' and initially all the List of item are loaded. Each Item has isRequested,isTaken and isAvailable. Now, I need to filter those arrays…
Biraz Dahal
  • 361
  • 1
  • 5
  • 20
0
votes
1 answer

Reaction's side effect triggered only once if the mutation is inside another reaction's side effect

var obj = mobx.observable({ arr: [{}, {}, {}] }); mobx.reaction(() => obj.arr.map(x => x.foo), (newValue) => { console.log(newValue); }); var trigger = mobx.observable({ flag: false }); mobx.reaction(() => trigger.flag, newValue => { …
mannok
  • 1,712
  • 1
  • 20
  • 30