Skip to content

Commit ab8f57a

Browse files
Align two pages with the framework-comparison policy
Components and JSX: 'provider and hook pattern' names the primitive. Performance: describe the construct instead of quoting another framework's error message. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 447d5e6 commit ab8f57a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/routes/(2)concepts/(1)components-and-jsx.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ Context passes a value through a component subtree without forwarding it through
326326
Use it when a value belongs to one subtree and several descendants need that value, including application-wide state: a provider at the root of `App` reaches every component.
327327
Prefer this over a module-scope signal or store.
328328
Module-scope state has no owner, and on the server one module instance is shared across requests; a context value is created per app, or per request.
329-
[Share state between components](/concepts/reactivity#share-state-between-components) shows the provider and hook pattern, and [State management](/guides/state-management#share-with-context) covers what to put in `value` and when a default is appropriate.
329+
[Share state between components](/concepts/reactivity#share-state-between-components) shows the provider plus `useX` primitive pattern, and [State management](/guides/state-management#share-with-context) covers what to put in `value` and when a default is appropriate.
330330
[`createContext`](/reference/solid-js/components-context/create-context) returns a context that is also its provider component.
331331
[`useContext`](/reference/solid-js/components-context/use-context) reads the value associated with the current owner.
332332

src/routes/(5)guides/(11)performance.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ A production build strips them, so measure the production bundle with the browse
5050

5151
A component function runs once.
5252
The JSX it returns compiles to expressions that each track what they read, so a signal write re-runs the expressions that read that signal and nothing else.
53-
"Too many re-renders" is therefore not a failure mode to look for, and a profile that shows a component function high in the stack is showing its first and only run.
53+
A component that runs too often is therefore not a failure mode to look for, and a profile that shows a component function high in the stack is showing its first and only run.
5454

5555
The failure modes that do exist are narrower, and each has a name in the console:
5656

0 commit comments

Comments
 (0)