You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, cells are instantiated lazily, i.e. only when needed to render. This suits most simple cases, when we might want to construct the cell with specific parameters at the time of rendering.
However, in more complex cases, if the constructor of one cell needed to adjust cells elsewhere in the layout, e.g. add Javascript to the head, or adjust the breadcrumbs/navigation, it makes sense to have all of the cells instantiated as soon as the layout is loaded, and adjust each before rendering using methods rather than constructor arguments.
E.g. when the product details cell is instantiated, it adds the zoom javascript to the head cell, and adds a path to the breadcrumbs cell. This happens when the layout is loaded, so that by the time the head cell is rendered, it has all of the details it need.s
The text was updated successfully, but these errors were encountered:
At the moment, cells are instantiated lazily, i.e. only when needed to render. This suits most simple cases, when we might want to construct the cell with specific parameters at the time of rendering.
However, in more complex cases, if the constructor of one cell needed to adjust cells elsewhere in the layout, e.g. add Javascript to the head, or adjust the breadcrumbs/navigation, it makes sense to have all of the cells instantiated as soon as the layout is loaded, and adjust each before rendering using methods rather than constructor arguments.
E.g. when the product details cell is instantiated, it adds the zoom javascript to the head cell, and adds a path to the breadcrumbs cell. This happens when the layout is loaded, so that by the time the head cell is rendered, it has all of the details it need.s
The text was updated successfully, but these errors were encountered: