rescript-lang / rescript-lang/rescript-lang.org
Document that you can do "intrinsic JSX elements"
Open
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 1.9k
- Forks
- 260
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 17
Description
Intrinsic JSX elements = lowercase JSX elements (<mesh /> from ThreeJs for example) that takes their own props, not just domProps which all lowercase JSX elements automatically do today.
This can be expressed already:
module Mesh = {
type props = {
position: (float, float, float),
ref?: ReactDOM.domRef,
scale?: float,
onClick?: ReactEvent.Mouse.t => unit,
onPointerOver?: ReactEvent.Mouse.t => unit,
onPointerOut?: ReactEvent.Mouse.t => unit,
children?: React.element,
}
@module("react/jsx-runtime") external make: (@as("mesh") _, props) => React.element = "jsx"
}
let rendered = <Mesh /> // will output <mesh> in the HTML
We need to document it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No documentation file or test is named in the issue. Locate the relevant JSX documentation, use the supplied Mesh example as the basis for the explanation, and consider the work done when intrinsic JSX elements and their custom props are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100