@Retention(value=RUNTIME) public @interface OnCreateInitialState
State
annotation in this spec. This method will take as
parameters a context and an com.facebook.litho.Output for every State variable that it will
initialize.
For example:
@LayoutSpec
public class MyChangeSetSpec {
@OnCreateInitialState
void onCreateInitialState(
ComponentContext c,
Output<SomeState> someState) {
someState.set(new SomeState());
}
}