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

Commit

Permalink
More danger
Browse files Browse the repository at this point in the history
  • Loading branch information
LPGhatguy committed Feb 19, 2020
1 parent a773bdc commit 6497a5a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/advanced/context.md
Expand Up @@ -59,9 +59,12 @@ end
```

## Legacy Context
Roact also has a deprecated version of context that pre-dates the stable context API. It will be removed in a future release, but is currently maintained for backwards-compatibility.
!!! danger
Legacy Context is a deprecated feature that will be removed in a future release of Roact.

Legacy context values cannot be updated dynamically. It is up to the context user to create their own mechanism for updates, probably using a wrapper component and `setState`.
Roact also has a deprecated version of context that pre-dates the stable context API.

Legacy context values **do not update dynamically** on their own. It is up to the context user to create their own mechanism for updates, probably using a wrapper component and `setState`.

To use it, add new entries to `self._context` in `Component:init()` to create a provider:

Expand Down Expand Up @@ -92,4 +95,4 @@ function Consumer:render()
Text = "Foo: " .. self.foo.value,
})
end
```
```

0 comments on commit 6497a5a

Please sign in to comment.