Reputation: 195
Whenever I add 'useStyles()' it forces to log any line two times.
Example:
function App() {
console.log('1')
const classes = useStyles() // adding this logs in console '1' twice
return (
<Fragment/>
)
Why it happens?
Upvotes: 0
Views: 113
Reputation: 195
by using the snippet below it actually renders once.
useEffect(() => {
console.log(count);
});
Upvotes: 0