-
-
Save tiagobento2/9f91a3b9e480ca7a6acfb5c7255e2232 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 MyPerspective extends AppFormer.Perspective { | |
private perspective: MyReactComponent; | |
constructor() { | |
super("my-screen"); | |
this.af_isReact = true; | |
} | |
public af_onOpen(): void { | |
this.perspective.fetchDataAndUpdate(); | |
} | |
public af_componentRoot(): AppFormer.Element { | |
return <MyReactComponent exposing={self => (this.perspective = self)} />; | |
} | |
} | |
AppFormer.registerPerspective(new MyPerspective()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment