Skip to content

Moved the try-catch block inside the async function#2

Open
echo-vladimir wants to merge 1 commit into
ibm-developer-skills-network:mainfrom
echo-vladimir:patch-1
Open

Moved the try-catch block inside the async function#2
echo-vladimir wants to merge 1 commit into
ibm-developer-skills-network:mainfrom
echo-vladimir:patch-1

Conversation

@echo-vladimir

Copy link
Copy Markdown

useEffect does not accept asynchronous functions directly. Moved the try-catch block inside the async function in useEffect to properly handle errors during the data fetch.

Moved the try-catch block inside the async function in useEffect to properly handle errors during the data fetch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant