docs(translation): Fix wrong import on example
Pull Request
Thank you for the great library! This PR fixes a naming conflict in the code examples.
What's Changed
- Resolved variable naming conflicts in documentation examples when importing locales from both
react-day-picker/localeanddate-fns/locale.
Type of Change
- [x] Documentation update
Additional Notes
This change improves clarity for developers using both libraries with localized calendars.
Removing will hide from developers that the react-day-picker re-exports date-fns/locale for convenience.
this is not the first time we get this feedback... but the export has been added in #2474 . Is there something wrong on our side? 🤔
Hi @gpbl @rodgobbi, thanks for the clarification! 🙏
I totally understand the intention of re-exporting date-fns/locale for convenience — however, after checking the published package, it seems the re-export isn’t actually working as expected.
I couldn’t find date-fns/locale included anywhere in the package (neither in the build output nor in the exports). I’ve attached some screenshots to show what I found — so even though the export was added in #2474 , it doesn’t appear to be accessible to consumers of the package right now.
Happy to help further or suggest a fix if needed! 🚀
@gonzalosalmeron, what react-day-picker version are you using in the example?
It should not have a dist/index.js file, and the file structure is not the same since v8.