These are chat archives for jdubray/sam

Nov 2016
Fred Daoud
Nov 13 2016 03:01
@devinivy there is a separate model for each instance of the same component. There is still a single root model; the separate models are nested within the root model. The component does not need to know anything about where it is nested.
Two instances of the random-gif component.
The model would look something like this:
  "randomGif1": {
    "isLoading": false,
    "isError": false,
    "tag": "cat",
    "image_url": ""
  "randomGif2": {
    "isLoading": false,
    "isError": false,
    "tag": "test",
    "image_url": ""
  "otherProperties": "etc"
But the model for the random-gif component only needs to concern itself with its own properties:
It is the nestComponent that takes care of wrapping/decorating the component config to nest the component within the root model.
devin ivy
Nov 13 2016 16:35
this actually isn't dissimilar to $scope in angular, which does a more complicated type of nesting