Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename ReactDOMServerNode{Only,} #819

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

anmonteiro
Copy link
Member

follow-up to #815

@anmonteiro anmonteiro marked this pull request as ready for review November 8, 2023 01:58
Copy link
Collaborator

@jchavarri jchavarri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What problem is this change solving?

I think there might be more limitations related to #814 down the line on because react-dom has different implementations for Node, Bun, Browser, Edge and they might diverge more over time. To solve that, I think we can continue adding specific modules for the missing engines.

Adding a new library means that ReasonReact users that don't need renderToPipeableStream can not keep using ReasonReact without having to add two libraries as deps.

Maybe I'm missing st?

@davesnx
Copy link
Member

davesnx commented Nov 8, 2023

I liked node becaues renderToPipeableStream just works in node, eventually splitting react and react-dom seems innevitable in reason-react

I got the feeling we spend too much time on renaming things on all clients of reason-react that any change is really painful for just us.

@jchavarri
Copy link
Collaborator

Discussed offline.

Maybe we can look at it from the docs perspective https://react.dev/reference/react-dom/server.

If we follow that arrangement, it would mean we would expose 3 libs:

  • node
  • web
  • non-streaming

We can expand with bun or whatever in the future if it also has different API (I suspect it will follow Node).

@anmonteiro
Copy link
Member Author

I wasn't aware that renderToPipeableStream only worked in Node, or about the state of react-dom/server and its different implementations.

In that case, I like Javi's idea.

@anmonteiro anmonteiro force-pushed the anmonteiro/reason-react.dom-server branch from 506ce06 to ab9cd0a Compare November 27, 2023 00:43
@anmonteiro anmonteiro changed the title refactor: unify "node only" and ReactDOMServer chore: rename ReactDOMServerNode{Only,} Nov 27, 2023
@anmonteiro
Copy link
Member Author

This PR is now just changing the name of ReactDOMServerNodeOnly to ReactDOMServerNode. NodeOnly felt like a weird name, but I don't have a strong opinion.

@anmonteiro anmonteiro merged commit 96f9b55 into main Nov 27, 2023
3 checks passed
@anmonteiro anmonteiro deleted the anmonteiro/reason-react.dom-server branch November 27, 2023 22:22
Sign up for free to 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.

3 participants