Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add RSC and RCC for turbopack to benchmarks #2620

Merged
merged 2 commits into from Nov 7, 2022
Merged

add RSC and RCC for turbopack to benchmarks #2620

merged 2 commits into from Nov 7, 2022

Conversation

sokra
Copy link
Member

@sokra sokra commented Nov 7, 2022

RSC: whole page is a server component
RCC: whole page is a client component

add app directory to test app

This also makes sure that app dir is tested as part of the benchmark tests

RSC: whole page is a server component
RCC: whole page is a client component

add `app` directory to test app
@sokra sokra requested a review from a team as a code owner November 7, 2022 15:52
@vercel
Copy link

vercel bot commented Nov 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Nov 7, 2022 at 3:53PM (UTC)
5 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Nov 7, 2022 at 3:53PM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Nov 7, 2022 at 3:53PM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Nov 7, 2022 at 3:53PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Nov 7, 2022 at 3:53PM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Nov 7, 2022 at 3:53PM (UTC)

@@ -29,6 +29,10 @@ pub trait Bundler {
fn has_server_rendered_html(&self) -> bool {
false
}
/// There is a hydration done event emitted by client side JavaScript
fn has_interactivity(&self) -> bool {
true
Copy link
Contributor

Choose a reason for hiding this comment

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

You could change has_interactivity and has_server_rendered_html to return an enum.

enum InteractivityMode {
    None,
    HydrationDone,
}

impl InteractivityMode {
    pub fn is_interactive(&self) -> bool {
        match self { ... }
    }
}

enum RenderMode {
    Client,
    Server,
}

// etc.

This will make the following code clearer to understand, without having to know the order of arguments to Turbopack::new.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll do

@sokra sokra merged commit 5e58916 into main Nov 7, 2022
@sokra sokra deleted the bench/app-dir branch November 7, 2022 16:51
jridgewell pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
* fixup ropes

* add RSC and RCC for turbopack to benchmarks

RSC: whole page is a server component
RCC: whole page is a client component

add `app` directory to test app
sokra added a commit to vercel/next.js that referenced this pull request Mar 13, 2023
* fixup ropes

* add RSC and RCC for turbopack to benchmarks

RSC: whole page is a server component
RCC: whole page is a client component

add `app` directory to test app
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.

None yet

2 participants