You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is blocked if we want to continue using @trussworks/react-uswds. There is a ticket on the @trussworks/react-uswds repo tracking the issue: trussworks/react-uswds#2540
Details
The template currently uses the @trussworks/react-uswds package for providing React versions of the U.S. Web Design System's components. The current implementation of that package makes it incompatible with React server components.
To use the package with the Next.js App Router today, every page would need to include the "use client" directive, which means the template wouldn't be capable of providing the benefits of React server components:
Server Components can reduce the amount of code sent and run by the client. Only Client modules are bundled and evaluated by the client.
Server Components benefit from running on the server. They can access the local filesystem and may experience low latency for data fetches and network requests.
The text was updated successfully, but these errors were encountered:
sawyerh
added
bug
Something isn't working
triage
New issue which needs reviewed by a maintainer
feature
New feature or request
and removed
triage
New issue which needs reviewed by a maintainer
bug
Something isn't working
labels
Nov 8, 2023
sawyerh
changed the title
@trussworks/react-uswds can't be used in a React server component
Support React server components
Nov 8, 2023
Blockers
This is blocked if we want to continue using
@trussworks/react-uswds
. There is a ticket on the@trussworks/react-uswds
repo tracking the issue: trussworks/react-uswds#2540Details
The template currently uses the
@trussworks/react-uswds
package for providing React versions of the U.S. Web Design System's components. The current implementation of that package makes it incompatible with React server components.To use the package with the Next.js App Router today, every page would need to include the
"use client"
directive, which means the template wouldn't be capable of providing the benefits of React server components:Additional resources
The text was updated successfully, but these errors were encountered: