0

    useEffect( async () => {
        if (authToken) {
            const { users} = await client.queryUsers({ role: 'user'})
            setUsers(users)
        }
    }, [])

And I keep getting this error in my terminal:

Line 95:16: Effect callbacks are synchronous to prevent race conditions. Put the async function inside

Any and all help will be appreciated

0 Answers0