mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): refactor import from lesson 25 of learning react - work with forms (#61796)
This commit is contained in:
+2
-4
@@ -217,11 +217,9 @@ To fix this issue, you need to wrap the action in `startTransition`:
|
||||
```jsx
|
||||
"use client";
|
||||
|
||||
import { useActionState } from "react";
|
||||
import { getUsers } from "./actions/getUsers";
|
||||
|
||||
// import startTransition from React
|
||||
import { startTransition } from "react";
|
||||
import { useActionState, startTransition } from "react";
|
||||
import { getUsers } from "./actions/getUsers";
|
||||
|
||||
export default function FetchUsers() {
|
||||
const [users, fetchAction, isPending] = useActionState(getUsers, []);
|
||||
|
||||
Reference in New Issue
Block a user