I've done some research on this topic and i think it's only possible on the tpyescript platform and not regular js anymore with the upgrade. It's also stated in the upgraded note to switch. "If you’re using propTypes, we recommend migrating to TypeScript or another type-checking solution." hope this helps