Skip to content

React Utils - v1.0.1

Choose a tag to compare

@ItsJonQ ItsJonQ released this 21 Sep 13:55
· 31 commits to master since this release

getValidProps: Improve filtering

This update improve the prop filtering for getValidProps and isPropValid.
It uses the REGEX based algorithm borrowed from styled-components.

Previously, this function was using the is-prop-valid util from Emotion.
It worked, for the most part. However, it did not filter out custom props that
were named similarly to default React props, mainly things beginning with on.

Props like onOpen or onDidClose would be let through.