getndazn / kopytko-framework

A modern Roku's Brightscript framework based on JS world's solutions
MIT License
19 stars 6 forks source link

feat: introduced KopytkoRoot that makes integration easier #32

Closed RadoslawZambrowski closed 2 years ago

RadoslawZambrowski commented 2 years ago

What did you implement:

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:

Is this ready for review?: YES Is it a breaking change?: NO

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 1.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: