Best datastructure for mobx + react-virtualized list -


i have few thousand items in mobx store, kept in observable.map() data structure, uuid: model pairs. model class @observable properties. choose map() datastructure need to:

  • add items
  • remove items
  • check if item present in store

in reasonable performance , map() offered these properties.

i'd render list in react-virtualized list view, requires array-like datastructure. i'd keep order in list consistent: adding or removing item should not shuffle view.

what best choice above problem? using @computed on .values() , .size on-the-fly transform map list structure? or should using totally different data structure? possible use react-virtualized's list directly map() input?


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -