Skip to content

unexpected cached result #85

@himself65

Description

@himself65
export default defineRouter(
  async id => {
    switch (id) {
      case 'index': {
        const { default: AppCreator } = await import('./src/app.js');
        return AppCreator({
          name: 'this is index'
        });
      }
      case 'about': {
        const { default: AppCreator } = await import('./src/app.js');
        return AppCreator({
          name: 'this is about'
        });
      }
      default:
        return null;
    }
  },
  async () => {
    return ['index', 'about'];
  }
);
const App = ({ name = "Anonymous" }) => () => {
  return (
    <div style={{ border: "3px red dashed", margin: "1em", padding: "1em" }}>
      <h1>Hello {name}!!</h1>
      <h3>This is a server component.</h3>
    </div>
  );
};

export default App;

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions