generated from react-component/footer
-
-
Notifications
You must be signed in to change notification settings - Fork 337
Open
Description
Issue
Picker props depend on an external Day.js instance, creating an implicit dependency on its plugins. This breaks when the app uses a different Day.js version.
It's very easy for multiple versions of Day.js to coexist in a single project. For example, see this commit: simply adding a latest Day.js dependency to my-component results in two different Day.js versions being present in the project.
In my actual project, the issue was even more subtle—merely updating a component that depends on Day.js inadvertently introduced a second Day.js version.
Reproduction Issue
- Clone the repository:
git clone git@github.com:1o1w1/reproduction-rc-picker.git - Install dependencies:
pnpm install - Start the component dev server:
cd packages/my-component && npm run dev - Start the application dev server:
cd packages/my-app && npm run dev - Open http://localhost:3000/ in your browser.
- Click the RangePicker — the app crashes.
Metadata
Metadata
Assignees
Labels
No labels