KopytkoRoot.brs with initKopytkoRoot that makes easier integration with Kopytko, ie. when we want Kopytko to be used in a non-kopytko parent component.
How did you implement it:
initKopytkoRoot receives a list of dynamic props, observes them, and initializes component with current values of dynamic props.
Dynamic props observer calls updateProps for the changed prop. That could be in future improved to enqueue such changes.
How can we verify it:
There is an example in the readme. This way it can be applied to the item component used by the RowList (or other ArrayGrid components). Thanks to this there is no need of adding observers manually and componentDidUpdate receives correct prevProps. Without calling updateProps on prop change componentDidUpdate gets always initial values in prevProps.
Todos:
[X] Write documentation (if required)
[X] Fix linting errors
[X] Enable "Allow edits from maintainers" for this PR
[X] Update the messages below
Is this ready for review?: YES
Is it a breaking change?: NO
What did you implement:
KopytkoRoot.brs
withinitKopytkoRoot
that makes easier integration with Kopytko, ie. when we want Kopytko to be used in a non-kopytko parent component.How did you implement it:
initKopytkoRoot
receives a list of dynamic props, observes them, and initializes component with current values of dynamic props. Dynamic props observer callsupdateProps
for the changed prop. That could be in future improved to enqueue such changes.How can we verify it:
There is an example in the readme. This way it can be applied to the item component used by the RowList (or other ArrayGrid components). Thanks to this there is no need of adding observers manually and
componentDidUpdate
receives correctprevProps
. Without callingupdateProps
on prop changecomponentDidUpdate
gets always initial values inprevProps
.Todos:
Is this ready for review?: YES Is it a breaking change?: NO