rescript-lang / rescript-lang/rescript-lang.org

Document First Class Modules

Open
#155 10 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
MDX
Stars
1.9k
Forks
260
Avg merge
3d 9h
Merged PRs (30d)
17

Description

This is an advanced topic.

FCMs are a thing, but we noticed that it's almost always easier to use a function instead of a "packed module". E.g. in React development, some ppl wanted to use the more complex FCM syntax to pass around React components, but actually what they wanted is passing around the make function instead.

So there should be definitely some hint that this is a feature that exist, but simpler language features are oftentimes enough.

Contributor guide

Open the contributing guide

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

No file, test, or entry point is named. Review the documentation site's existing coverage of First Class Modules, including the React example context, and document when FCMs are useful versus when passing a function is simpler; done when this guidance is published.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.