Skip to content

use non deprecated way to get record name #10

@marianoguerra

Description

@marianoguerra

multiple locations [1] get record name using ._name which is marked as deprecated [2]

we could have an utility function that uses the modern way and falls back to _name if not found to be backward compatible but allow future versions of immutable to drop ._name.

[1]

record._name || record.constructor.name || 'Record',

record._name || record.constructor.name || 'Record',

[2] https://github.com/immutable-js/immutable-js/blob/9acd11a87e1c628f08639f9ae0539073f4ee46d8/src/Record.js#L63

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions