DEV Community

Discussion on: Usestate hook not working inside arrow component.

Collapse
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)?

Collapse
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.