rescript-lang / rescript-lang/rescript-react

Split into multiple packages?

Open
#60 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ReScript
Stars
517
Forks
45
PR merge metrics
No merged PRs in 30d

Description

  1. With JSX4 bringing breaking changes, the JSX3 bindings have been moved into a separate namespace ReactV3. I was wondering if this ReactV3 namespace shouldn't better be provided by some compatibility package.
  2. @rescript/react currently includes bindings for both react and react-dom and also has both as peer and dev dependencies. However, not every React project is also using React DOM. E.g. React Native projects aren't. So IMHO react-dom bindings should go into their own package.
  3. #33 mentions the idea to split out ReScriptReactRouter into a separate package.

If we did all that, we'd end up with something like

  • @rescript/react
  • @rescript/react-dom
  • @rescript/react-jsx3-compat
  • @rescript/rescript-react-router (or just rescript-react-router?)

@mattdamon108 @cristianoc What do you think? How would such a split affect the PPX?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the current @rescript/react package contents, its React and react-dom bindings and dependencies, and the PPX references mentioned in the issue. Done would require an agreed package split covering ReactV3 compatibility, react-dom, and ReScriptReactRouter, including how the PPX is affected.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.