Skip to content

Skip rendering None in all situations - #1171

Merged
rmorshea merged 9 commits into
reactive-python:mainfrom
rmorshea:none-renders-as-fragment
Dec 28, 2023
Merged

Skip rendering None in all situations#1171
rmorshea merged 9 commits into
reactive-python:mainfrom
rmorshea:none-renders-as-fragment

Conversation

@rmorshea

@rmorshearmorshea commented Dec 10, 2023

Copy link
Copy Markdown
Collaborator

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.

@rmorshearmorshea changed the title none renders as fragmentSkip rendering None in all situationsDec 10, 2023
Archmonger
Archmonger previously approved these changes Dec 11, 2023
Comment threaddocs/source/about/changelog.rst Outdated
Comment threadsrc/py/reactpy/reactpy/core/layout.py Outdated
@rmorshea
rmorsheaforce-pushed the none-renders-as-fragment branch from c869812 to 204534dCompareDecember 28, 2023 01:35
@rmorshea
rmorsheaforce-pushed the none-renders-as-fragment branch from f29b233 to 72ed1e4CompareDecember 28, 2023 02:53
@rmorshea
rmorshea merged commit 3a3ad3f into reactive-python:mainDec 28, 2023
Sign up for freeto 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

@rmorshea@Archmonger