Function declaration:
export default function Labyrinth({ theme = 1 }, { inverted = 0 }) {
While declaring proptypes
Labyrinth.propTypes = {
inverted: PropTypes.bool.isRequired,
theme: PropTypes.oneOf([1, 2, 3]).isRequired,
}
And it shows 'inverted' PropType is defined but prop is never usedeslintreact/no-unused-prop-types
It works but it shows an eslint error.
The way to do this is to declare all inside the same curly brackets just like: