I am trying to make us of useEffect in my React component but I am encountering an issue with the following error:
TypeError: react_1.useEffect is not a function
and
Uncaught (in promise) TypeError: react_1.useState is not a function
I have imported the libraries like this
import React, { useEffect } from 'react'
and have the useEffect like this:
useEffect(() => {
console.log("This is cool")
}, [intentButton])
The react version is 16.7.0