-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Adding Tutorial for Reading and Writing a File #4089
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
Conversation
|
View your CI Pipeline Execution ↗ for commit b0e48e3.
☁️ Nx Cloud last updated this comment at |
|
|
||
| At this point, your app will look like this - | ||
|
|
||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we inline the images in the repo?
See, docs/router/framework/react/guide/custom-search-param-serialization.md.
This should have it work where the website will automatically choose the image based on the selected branch.
|
|
||
| ```tsx | ||
| // src/serverActions/jokesActions.ts | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space/line break.
|
|
||
| With a little Tailwind styling, the app should look like this: | ||
|
|
||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image in-lining.
| ``` | ||
|
|
||
| With this, our UI should look like this: | ||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image in-lining.
|
|
||
| ### Data Flow | ||
|
|
||
|  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image in-lining.
|
|
||
| ## Nice to know | ||
|
|
||
| - [Server Side Rendering (SSR)](https://tanstack.com/router/latest/docs/framework/react/guide/ssr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use absolute linking, without the origin.
| - [Server Side Rendering (SSR)](https://tanstack.com/router/latest/docs/framework/react/guide/ssr) | |
| - [Server Side Rendering (SSR)](/router/latest/docs/framework/react/guide/ssr) |
Incorporating feedback from PR - #4089. Changes made - 1. Moved images to `assets` folder on suggestion 2. Changed URLs from absolute to relative. 3. Adding an in-line sequence diagram <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Newly added jokes now receive unique identifiers, improving reliability when creating new entries. * **Documentation** * Updated links to internal paths for SSR, router concepts, and React Query sections. * Switched images to repository-hosted assets for consistency and availability. * Replaced the data flow image with an inline Mermaid sequence diagram covering home-page loading and add-joke flows, including data refresh behavior. * Minor formatting cleanup. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Add DevJokes Tutorial: Reading and Writing Files
Description
Adds a tutorial showing how to build a full-stack DevJokes app with TanStack Start. Users learn to create server functions for reading and writing to files, build React components, and implement data fetching with TanStack Router.
Key Features
createServerFnfsrouter.invalidate()Demo
https://youtu.be/zd0rtKbtlgU
Reference
Complete code available at: https://github.com/shrutikapoor08/devjokes