React UseState interface and eslint - am I doing this right?
eslint no-unused-vars rule is failing on the variables in the interfaces for my react components.
I have n-number of components and I manage their state from the parent component, so I declare an interface in the component and pass the useState from the parent component to the child component using props.
Each component starts with an interface declaration like so
And the component renders itself conditionally based on the value of showCreateCategoryModal.
eslint no-unused-vars is failing for the variable
show
show
in the interface declaration because it is never used. The setShowCreateCategoryModal gets assigned to the values coming from the parent component defining