We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type Props = { 'data-action': string, }; function Button({ 'data-action': dataAction }: Props) { return <div data-action={dataAction} />; }
error 'data-action' is missing in props validation react/prop-types
The text was updated successfully, but these errors were encountered:
I noticed I can use a computed property name to avoid the error.
function Button({ ['data-action']: dataAction }: Props) {
Sorry, something went wrong.
I made a test case with the code from the issue and it passed.
Let’s merge that into master to close this issue :-)
Additional test case for literals as prop keys in prop-types
ab4ad96
Resolves jsx-eslint#1299
No branches or pull requests
The text was updated successfully, but these errors were encountered: