Skip to content

Proposal for representing static children and selectively avoid React warnings #653

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Canna71
Copy link

@Canna71 Canna71 commented Mar 19, 2025

This PR aims at solving the issue of not currently having a way to distinguish a static list of children from a dynamic one (e.g. a List.map).
Any solution that suppresses React warnings for lists without key is IMHO bad and it would be better to provide a way to express a static list of children; this should not be the default and using it will be a conscious choice, so we will never hide the warnings to the developers so they will realize when they missed to pass the keys.
More details and the logic behind it are in the discussion of the Issue #21

@Freymaurer
Copy link
Contributor

Hello @Canna71 ! We are currently restructuring Feliz for a v3.0.0 release. This release will shift Feliz to output JSX syntax which will circumvent the issue of static/dynamic children and handle them correctly!

I will add a module/docs guide for people who still want to use createElement syntax and will factor in your code here.

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

Successfully merging this pull request may close these issues.

2 participants