@Retention(value=RUNTIME)
public @interface OnCreateChildren
GroupSectionSpec
requires a method that is annotated
with OnCreateChildren
.
The method onCreateChildren is responsible for generating the children of a GroupSectionSpec
. Both GroupSectionSpec
and DiffSectionSpec
are valid children.
OnCreateChildren has access to both @Prop
and/or @State
annotations.
@OnCreateChildren static Children onCreateChildren( final SectionContext c, @State boolean isLoading, @Prop int prop) { return Children.create() .child(SingleComponentSection.create(c).component(SomeComponent.create(c).build()) .build(); }