Skip to content

[Bug?]: "invalid server function" when having a server function without a router#2168

Description

@huseeiin

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

Error: invalid server function: 29bb30aa-0-test

Expected behavior 馃

No response

Steps to reproduce 馃暪

const test = () => {
  "use server";
  return 1;
};

export default function App() {
  return (
    <>
      <h1
        onClick={() => {
          test();
        }}
      >
        hi
      </h1>
    </>
  );
}

then click the h1

Context 馃敠

No response

Your environment 馃寧

version 2.0.0-alpha.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions