Skip to content

Bug: BigInt does not get toString()'d when rendered #20492

@andyboyne

Description

@andyboyne
{1n}
should render 1. Instead it renders ''.

It looks like 'bigint' just needs adding here: https://github.com/facebook/react/blob/master/packages/react-dom/src/client/ToStringValue.js#L26.

Happy to raise a PR or take guidance on a better approach.

React version: all

Steps To Reproduce

Link to code example: https://codepen.io/boyne/pen/vYXJWVr

The current behavior

Renders ""

The expected behavior

Renders 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions