mirror of
https://github.com/remix-run/agent-skills.git
synced 2026-09-19 01:10:27 +08:00
Update SKILL.md
nicer and consistent with the rest of the file
This commit is contained in:
@@ -72,7 +72,9 @@ ReactDOM.createRoot(root).render(<RouterProvider router={router} />);
|
||||
|
||||
```tsx
|
||||
const fetcher = useFetcher();
|
||||
const optimistic = (fetcher.formData?.get("favorite") ?? isFavorite.toString()) === "true";
|
||||
const optimistic = fetcher.formData
|
||||
? fetcher.formData.get("favorite") === "true"
|
||||
: isFavorite;
|
||||
|
||||
<fetcher.Form method="post" action={`/favorites/${id}`}>
|
||||
<button>{optimistic ? "★" : "☆"}</button>
|
||||
|
||||
Reference in New Issue
Block a user