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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -