litho
litho copied to clipboard
Outdated documentation
Sample code regarding the MountSpec on this documentation page seems like outdated. As the first two paramters of annotation @OnMeasure cited on documentation was ...(ComponentContext context, Component component, ...) but the actual accepted parameters was ...(ComponentContext context, ComponentLayout componentLayout, ...). It will ended on compilation error with the message of error: Parameter in position 1 of a method annotated with interface com.facebook.litho.annotations.OnMeasure should be of type com.facebook.litho.ComponentLayout. com.facebook.litho.Component comp, int widthSpec, int heightSpec, @org.jetbrains.annotations.NotNull().