From 540574b788bd793f45e5cf2ea928131d0dec5080 Mon Sep 17 00:00:00 2001 From: hashlash Date: Tue, 27 Sep 2022 17:36:31 +0700 Subject: [PATCH] Add useState and useEffect import It makes copy-pasting the code easier since the person will be aware of the import --- docs/basic-features/data-fetching/client-side.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/basic-features/data-fetching/client-side.md b/docs/basic-features/data-fetching/client-side.md index d738cbd2d742d..0436da449e67f 100644 --- a/docs/basic-features/data-fetching/client-side.md +++ b/docs/basic-features/data-fetching/client-side.md @@ -15,6 +15,8 @@ It's important to note that using client-side data fetching can affect the perfo The following example shows how you can fetch data on the client side using the useEffect hook. ```jsx +import { useState, useEffect } from 'react' + function Profile() { const [data, setData] = useState(null) const [isLoading, setLoading] = useState(false)