Skip to content

Instantly share code, notes, and snippets.

@gskachkov
Last active November 11, 2018 00:28
Show Gist options
  • Save gskachkov/077b24f879e8580ed3a1f2ecefdb8991 to your computer and use it in GitHub Desktop.
Save gskachkov/077b24f879e8580ed3a1f2ecefdb8991 to your computer and use it in GitHub Desktop.
class SimpleLayoutWorlet
*intrinsicSizes() {}
*layout(children, edges, constraintSpace, styles) {
const childFragments = []
for(const child of children) {
const childFragment = yield child.layoutNextFragment();
...
}
return {
childFragments
};
}
}
registerLayout('simpleLayout', SimpleLayoutWorlet);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment