Results 1 to 2 of 2

Thread: ViewModel.stores vs .data for stores created outside the ViewModel?

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    631
    Answers
    10

    Default ViewModel.stores vs .data for stores created outside the ViewModel?

    In all of our ViewModels the stores are created outside of them. Using them in data is easier using set() and get() and our grids seem to bind just fine with it in stores or data. Is there any benefit to putting them in stores over data?

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759

    Default

    Stores allow you to define bound properties, for example:

    Code:
    filters: [{
        property: 'foo',
        value: '{foo}'
    }]
    They also handle store creation & destruction.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •