Closed colemars closed 2 years ago
Ah.. I see. DefaultProps.
Defining defaultProps for required types isn't really the best practice (as demonstrated here..) https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md
https://stackblitz.com/edit/react-yqo1bd?file=src%2FApp.tsx
Any ideas how to get around this? It seems some types are optional for some reason directly on the component, but when abstracted out become required. Looking at the type themselves.. it seems they are defined as required.. e.g.
sortFunctions
. So it's somewhat of a mystery to me as why they're optional on theReactDataGrid
component.Is the optionality intended behavior or a useful bug?