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

chore(examples): add react/next.js example #1744

Conversation

jog1t
Copy link
Contributor

@jog1t jog1t commented Dec 30, 2024

A more complex, server driver ui, example will be added soon.

Changes

Copy link

cloudflare-workers-and-pages bot commented Dec 30, 2024

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 41fa425
Status:⚡️  Build in progress...

View logs

Copy link
Contributor Author

jog1t commented Dec 30, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jog1t jog1t self-assigned this Dec 30, 2024
@jog1t jog1t requested a review from NathanFlurry December 30, 2024 21:32
@jog1t jog1t marked this pull request as ready for review December 30, 2024 21:32
@jog1t jog1t force-pushed the 12-30-chore_examples_add_react_next.js_example branch from c8b7445 to 86f2b2b Compare December 30, 2024 21:34
@jog1t jog1t force-pushed the 12-30-fix_actors-sdk_use_proper_binary_fromat_when_receiving_cbor_data branch from d20807e to 607a134 Compare January 2, 2025 15:56
@jog1t jog1t force-pushed the 12-30-chore_examples_add_react_next.js_example branch from 86f2b2b to 8c43a98 Compare January 2, 2025 15:56
@jog1t jog1t force-pushed the 12-30-fix_actors-sdk_use_proper_binary_fromat_when_receiving_cbor_data branch from 607a134 to 8ce1794 Compare January 7, 2025 00:12
@jog1t jog1t force-pushed the 12-30-chore_examples_add_react_next.js_example branch from 8c43a98 to 7eb16d9 Compare January 7, 2025 00:13
@jog1t jog1t force-pushed the 12-30-fix_actors-sdk_use_proper_binary_fromat_when_receiving_cbor_data branch from 8ce1794 to 015295a Compare January 11, 2025 01:44
@jog1t jog1t force-pushed the 12-30-chore_examples_add_react_next.js_example branch from 7eb16d9 to 512fbb4 Compare January 11, 2025 01:45
Copy link

cloudflare-workers-and-pages bot commented Jan 11, 2025

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: 512fbb4
Status:🚫  Build failed.

View logs

@jog1t jog1t force-pushed the 12-30-fix_actors-sdk_use_proper_binary_fromat_when_receiving_cbor_data branch from 015295a to 618a98a Compare January 11, 2025 14:58
@jog1t jog1t force-pushed the 12-30-chore_examples_add_react_next.js_example branch from 512fbb4 to 012d6ef Compare January 11, 2025 14:58
Copy link
Member

@NathanFlurry NathanFlurry left a comment

Choose a reason for hiding this comment

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

i'm reviewing the code at the top of the stack, but leaving the review on this pr.

should we fold 1756 in to 1744 bc this is incomplete?

i think we should rename "examples/react" to something more specific like "react-rsc" or "react-sdui" or "react-server-driven-ui." we're going to have a lot of examples, so we need to keep them organized. my branch has a "registry" of examples so we'll be able to auto-gen uis for these.

is there a problem with including the deno.json and rivet.json in the root of the react project then storing actors under src/actors?

reading the react code looks more complicated at the surface than it actually is. ideally it's as simple to read as the thing we put on twitter. throwing out some ideas, but use your best judgement:

  • throw chat components under components folder. so src/actors & src/components & src/app
  • name the files clearer: "server-driven-ui" is not well differentiated from "simple-chat." took me a while to realize these are two separate examples.
  • why not merge together SimpleChat and ChatContent? is this just a convention to split it out i'm missing?

clarifying: we don't have the ability to automatically call getMessages like the idea we proposed right?

Copy link
Member

@NathanFlurry NathanFlurry left a comment

Choose a reason for hiding this comment

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

there might be a lot of changes from my pr, might want to just add a new pr to the stack

@jog1t jog1t force-pushed the 12-30-fix_actors-sdk_use_proper_binary_fromat_when_receiving_cbor_data branch from 618a98a to 748f4af Compare January 16, 2025 18:14
@jog1t jog1t force-pushed the 12-30-chore_examples_add_react_next.js_example branch from 012d6ef to 41fa425 Compare January 16, 2025 18:14
@jog1t jog1t merged commit 41fa425 into 12-30-fix_actors-sdk_use_proper_binary_fromat_when_receiving_cbor_data Jan 16, 2025
4 of 8 checks passed
@jog1t jog1t deleted the 12-30-chore_examples_add_react_next.js_example branch January 16, 2025 18:18
@jog1t jog1t mentioned this pull request Jan 20, 2025
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