From 1f2f16251ed35d06ca3fc6c4a3f81fd3b98f096c Mon Sep 17 00:00:00 2001 From: Kampfkarren Date: Thu, 10 Oct 2019 18:13:55 -0700 Subject: [PATCH] More specific documentation --- docs/api-reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 .. "!" })