We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa652cd commit 890c4b3Copy full SHA for 890c4b3
2 files changed
examples/react/basic/src/main.tsx
@@ -123,6 +123,14 @@ function PostComponent() {
123
<h4 className="text-xl font-bold">{post.title}</h4>
124
<hr className="opacity-20" />
125
<div className="text-sm">{post.body}</div>
126
+
127
+ <Link
128
+ to="/posts"
129
+ preferBack
130
+ className="py-1 px-2 rounded bg-green-600 text-white hover:opacity-90"
131
+ >
132
+ ← Back to posts
133
+ </Link>
134
</div>
135
)
136
}
examples/react/basic/src/posts.ts
@@ -13,7 +13,7 @@ export const fetchPosts = async () => {
13
await new Promise((r) => setTimeout(r, 500))
14
return axios
15
.get<Array<PostType>>('https://jsonplaceholder.typicode.com/posts')
16
- .then((r) => r.data.slice(0, 10))
+ .then((r) => r.data.slice(0, 50))
17
18
19
export const fetchPost = async (postId: string) => {
0 commit comments