Closed pedrobslisboa closed 6 months ago
The data-reactroot was available before v18 when calling renderToString, but react removed it. It can be checked by seeing that renderToString doesn't return a string element with data-reactroot at this test: https://github.com/facebook/react/blob/ed3c65caf042f75fe2fdc2a5e568a9624c6175fb/packages/react-dom/src/__tests__/ReactServerRendering-test.js#L4
data-reactroot
The commit which removed that is this one: https://github.com/facebook/react/commit/940f48b999a3131e77b2545bd7ae252ef27ae6d1
react_root_attr_name
Super good @pedrobslisboa
Related Issue https://github.com/ml-in-barcelona/server-reason-react/issues/126
Motivation
The
data-reactroot
was available before v18 when calling renderToString, but react removed it. It can be checked by seeing that renderToString doesn't return a string element withdata-reactroot
at this test: https://github.com/facebook/react/blob/ed3c65caf042f75fe2fdc2a5e568a9624c6175fb/packages/react-dom/src/__tests__/ReactServerRendering-test.js#L4The commit which removed that is this one: https://github.com/facebook/react/commit/940f48b999a3131e77b2545bd7ae252ef27ae6d1
What this PR does
react_root_attr_name
and its follow dependencies;Checklist