diff --git a/docs/api-reference.md b/docs/api-reference.md index d449c357..af5f574e 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -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 .. "!" })