Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing "key" in CategorizedAppLists with React #114

Open
ValGab opened this issue Jan 16, 2025 · 1 comment
Open

Missing "key" in CategorizedAppLists with React #114

ValGab opened this issue Jan 16, 2025 · 1 comment
Assignees

Comments

@ValGab
Copy link

ValGab commented Jan 16, 2025

Hello,

I tried to integrate Orejime into a NextJS App Router (React) project.

I have this following error in the console when the modal is oppened :
Warning: Each child in a list should have a unique "key" prop. Check the render method of `CategorizedAppList`

Is it a missing code in this package ?

Also, Orejime isn't compatible with Typescript ? I had to made my own type file.

Thanks for your help 😊

@felixgirault
Copy link
Contributor

Hello,

This is indeed an error in the code 😬

However, there is a work in progress on a new major version which includes a typescript rewrite and fixes some issues like the one you mentionned.
This version will finally be available next month.

On the integration with next or other frameworks, maybe the best solution is to avoid building orejime with the rest of the app, and include it as a standalone script.
This would allow for separate caching of the resource, and would prevent any issues with rebuilding the sources. Also, react could be considered an internal implementation detail, and we may use any other technology in the future.
The only downside would be that the react code wouldn't be shared amongst the app and orejime, but the standalone version is as optimized as it can be (it uses preact).

@felixgirault felixgirault self-assigned this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants