diff --git a/docs/api-reference.md b/docs/api-reference.md index f2b30ad6..f12eb796 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -142,8 +142,8 @@ It's similar to `Roact.Event`: ```lua Roact.createElement("ScrollingFrame", { - [Roact.Change.CanvasPosition] = function(rbx, position) - print("ScrollingFrame scrolled to", position) + [Roact.Change.CanvasPosition] = function(rbx) + print("ScrollingFrame scrolled to", rbx.CanvasPosition) end, }) ``` @@ -395,4 +395,4 @@ end As with `setState`, you can set use the constant `Roact.None` to remove a field from the state. !!! note - `getDerivedStateFromProps` is a *static* lifecycle method. It does not have access to `self`, and must be a pure function. \ No newline at end of file + `getDerivedStateFromProps` is a *static* lifecycle method. It does not have access to `self`, and must be a pure function.