Skip to content

data-reactid alternative. #5869

@DylanPiercey

Description

@DylanPiercey

I know 0.15.0 no longer uses keys in data-reactids which is part of my issue however I'd like to bring forward a different way to link the dom for the initial render which is to keep text nodes and regular nodes separate.

I have implemented something like this in my own simple virtual dom here https://github.com/DylanPiercey/tusk/blob/master/lib/virtual/node.js#L80 and here https://github.com/DylanPiercey/tusk/blob/master/lib/virtual/text.js#L37

I am not sure if react works this way at all but essentially it recursively mounts nodes from the top down and splits up text nodes using splitText to ensure that the server produced dom matches the virtual structure.

Just curious if something like this is feasible in react since it has allowed me to implement bootstrapping server side code while producing clean html output without checksums or ids.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions