Skip to content

Support new React directives #13296

@ntkoopman

Description

@ntkoopman

React server components use the directive use client and use server to detect if code should run on the server or in the browser. These directives currently produces a warning in CodeQL.

use client spec: https://github.com/reactjs/rfcs/blob/main/text/0227-server-module-conventions.md
use server is still alpha: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions

https://github.com/vercel/next.js/blob/cf9591cd2346ca69e96da6e03994573ec9b24050/examples/with-turbopack/app/ssg/random-post-tab.tsx#L1
https://github.com/vercel/next.js/blob/cf9591cd2346ca69e96da6e03994573ec9b24050/test/e2e/app-dir/actions/app/header/actions.ts#L1

URL to the alert on GitHub code scanning (optional)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions