-
-
Save tiagobento2/2b947071f96bc70c694b84e5ea2dd033 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import * as AppFormer from "appformer-js"; | |
export class MyScreen extends AppFormer.Screen { | |
private screen: MyReactComponent; | |
constructor() { | |
super("my-screen"); | |
this.af_isReact = true; | |
this.af_componentTitle = "MyScreen title"; | |
} | |
public af_onOpen(): void { | |
this.screen.fetchDataAndUpdate(); | |
} | |
public af_componentRoot(): AppFormer.Element { | |
return <MyReactComponent exposing={self => (this.screen = self)} />; | |
} | |
} | |
AppFormer.registerScreen(new MyScreen()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment