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

Skip rendering None in all situations #1171

Merged
merged 9 commits into from Dec 28, 2023

Conversation

rmorshea
Copy link
Collaborator

@rmorshea rmorshea commented Dec 10, 2023

By submitting this pull request you agree that all contributions to this project are made under the MIT license.

Issues

Currently the value None will render as the string "None" when used as a child in VDOM elements. However, when returned by a component it will not render. This inconsistency is confusing for users.

fix #1025

Solution

We should skip rendering None in all cases.

Checklist

  • Tests have been included for all bug fixes or added functionality.
  • The changelog.rst has been updated with any significant changes.

@rmorshea rmorshea changed the title none renders as fragment Skip rendering None in all situations Dec 10, 2023
Archmonger
Archmonger previously approved these changes Dec 11, 2023
docs/source/about/changelog.rst Outdated Show resolved Hide resolved
src/py/reactpy/reactpy/core/layout.py Outdated Show resolved Hide resolved
@rmorshea rmorshea merged commit 3a3ad3f into reactive-python:main Dec 28, 2023
17 checks passed
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.

Fix None within reactpy.html
2 participants