Skip to content

Commit

Permalink
Add soft deprecation to scoped contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
msaraiva committed Feb 9, 2024
1 parent aa4cd2f commit 8eee671
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/surface_site_web/live/contexts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ defmodule SurfaceSiteWeb.Contexts do
## Scope-aware context
> **Soft deprecation alert:** Scope-aware context will be deprecaded in the near future and fully removed
> in `v0.13`. The reason is the lack of built-in support for that feature in Liveview itself, which
> leads to inefficient diff-tracking when using it. Global context related functions like `Context.put`
> and `Context.get`, as well as the `:from_context` option, will be kept as their use don't affect diff-tracking negatively.
Sometimes you need to initialize values that should be propagated only inside the component's
scope via its slots. For instance, when working with forms in Phoenix, you usually need to
define a form variable that has to be passed to input elements along with each field name.
Expand Down

0 comments on commit 8eee671

Please sign in to comment.