Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
More specific documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kampfkarren committed Oct 11, 2019
1 parent 9f8e31f commit 1f2f162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ render(props, state) -> Element | nil

`render` describes what a component should display at the current instant in time.

You can access the props and state of the component either through `self.props` and `self.state` respectively or through the arguments passed.

```lua
function MyComponent:render(props, state)
-- props == self.props
-- state == self.state
return Roact.createElement("TextLabel", {
Text = "Hello, " .. props.name .. "!"
})
Expand Down

0 comments on commit 1f2f162

Please sign in to comment.