-
-
Save tiagobento2/af0f3c7547c756208b2cae1b6af258bc 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"; | |
interface Props { | |
exposing: (self: MyReactComponent) => void; | |
} | |
interface State { | |
someData: any[]; | |
} | |
class MyReactComponent extends React.Component<Props, State> { | |
constructor(props: Props) { | |
super(props); | |
this.state = { someData: [] }; | |
} | |
public fetchDataAndUpdate() { | |
//fetches some data and updates state | |
} | |
public render() { | |
return <div>...</div>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment