1
J'ai lu la documentation Litho et je trouve cet exemple de codeQue fait l'annotation @FromPrepare de Litho?
@LayoutSpec(events = { ColorChangedEvent.class })
class ColorComponentSpec {
...
@OnCreateLayout
static ComponentLayout onCreateLayout(
Context c,
@Prop EventHandler colorChangedHandler,
@FromPrepare int color) {
...
ColorComponent.dispatchColorChangedEvent(
colorChangedHandler,
color);
...
}
}
Qu'est-ce que l'annotation @FromPrepare faire?
Nous avons maintenant enlevé ceci des docs: https://github.com/facebook/litho/commit/872539968179b5cea46bde8cc813a0117d24f452 – passy