Skip to content

Conversation

@underherzen
Copy link

No description provided.

interface PageContext {
config: {
pageStarted?: EventCallable<{ params: Record<string, string>; data: unknown }>;
pageClientStarted?: EventCallable<void>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think to make universal interface with pageStarted, pageClientStarted, and possible createServerStarted?

Suggested change
pageClientStarted?: EventCallable<void>;
pageClientStarted?: EventCallable<{ params: Record<string, string>; data: unknown }>;

@sergeysova sergeysova self-assigned this Sep 15, 2024
"node": ">=18.6.0"
},
"dependencies": {
"@effector/next": "^0.7.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why @effector/next is required for vike?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the same situation as in nextjs
we have to have 1 scope for an app and provide partial hydration of values

onClientStarted();
clientStartedRef.current = true;
}
}, []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}, []);
}, [onClientStarted]);

It is required, when we can switch from page without .pageClientStarted to another with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants