Answer the question
In order to leave comments, you need to log in
Does tslint-react-hooks work with react-app my-app --typescript?
i install react-app my-app --typescript and tslint-react-hooks but tslint-react-hooks don't work, i wrote code that shouldn't work but i don't get any error. I should have gotten 4 lines of error that cannot be declared by response.hooks if
import React,{ useState} from 'react';
const App = () => {
if(true){var [X, setX] = useState(0);}
console.log(X);
return (
<div>
{X}
</div>
);
}
Answer the question
In order to leave comments, you need to log in
Install, installed, and connected in the linter settings ?
{
"extends": [
// your other plugins...
"tslint-react-hooks"
],
"rules": {
// your other rules...
"react-hooks-nesting": "error"
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question