react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

componentUpdater.ts uses propTypesMap instead of Component.propTypes

Open yairopro opened this issue 3 years ago • 3 comments

The purpose of this PR is to be able to use this library on the web. If you try the library locally or on a CodeSandbox, it works as a charm. The problem is when CRA (create-react-app) builds a release. In its build process, CRA remove the components' propTypes for production. Since the library uses propTypes to know what props to pass to lower components, all props can't pass down and it breaks in production (on web).

This PR comes to allow componentUpdater.ts to get components' propTypes by another way using a shared Map called propTypesMap. Each component set its own propTypes in the propTypesMap.

This pattern prevent CRA to remove propTypes.

yairopro avatar Mar 31 '22 09:03 yairopro

Made the PR on the release branch https://github.com/wix/react-native-calendars/pull/1849

yairopro avatar Mar 31 '22 09:03 yairopro

Updated to master

yairopro avatar Jun 20 '22 08:06 yairopro

What needs to happen to get this merged in? Would love to use this as a universal component!

white-room avatar Aug 11 '22 19:08 white-room

When it will be merged in?

CheepyD avatar Sep 27 '22 13:09 CheepyD

any chance this getting merged?

dohomi avatar Sep 28 '22 01:09 dohomi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 27 '22 02:12 stale[bot]

Why was this never merged?

TNAJanssen avatar Aug 04 '23 07:08 TNAJanssen