DEV Community

Discussion on: Usestate hook not working inside arrow component.

daxsoft profile image
Michael Willian Santos

Are you importing React this way:

import React, { useState } from 'react' (correct),

rather than:

import React, { useState } from 'React' (incorrect)?

itssimondev profile image
Simone Aronica Author • Edited on

I am, my bad, I didn't specify: the issue is not when compiling, the issue is when running the code on a page.