Replies: 2 comments
-
This idea came up when I was thinking of purposing a |
Beta Was this translation helpful? Give feedback.
0 replies
-
Looks like a logical improvement to me. As long as we provide a tutorial how to migrate said agents to context api. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This discussion proposes to deprecate
Context
andJob
agents.The current state of these two agent kinds are kind of "awkward" as now we have
<ContextProvider />
&use_reducer
API available. Contexts and hooks are easier to understand, better documented, and can achieve the same goal as these agents.In addition, agents do not have a good way to access contexts provided by
<ContextProvider />
as they do not have a place in the VDom.Job Agent
Job agents can be replaced by an internal state machine mechanism (implemented with message) inside struct components or hooks API inside function components.
Context Agent
Context agents can be replaced with hooks / state machine of a parent component +
<ContextProvider />
.Beta Was this translation helpful? Give feedback.
All reactions