rescript-react
rescript-react copied to clipboard
Official ReScript bindings for ReactJS
There are use-cases where you want to create components that replicate native dom elements, such as ``, ``, etc. For that, you'd need something like `ReactDOM.domProps`, but as a `@obj...
Or I have missed it? Couldn't find it in this repo, so I guess is missing.
rescript-react doesn't allow `onReset` prop on `` element. (I think it should allow?) [Example](https://rescript-lang.org/try?code=DYUwLgBA9gdgygVwEYFsCWkC8EQDcQxYB8EA3gFAQQBSAzgHTBQDmAFAES3LphggAm7AJTkAvuXKhIsAEoha4CNjwFiZSjQZM27AE7zwfQSPHkAAvoCGAYzD1rUFAAdYqyYpSWA1iCURWQkokFFQAPABmULoo0PDcGLFyCmBEGmFoME4IkGAAnk4gAPqYnPFg7BC4lsAIICWIqBgVAPSpVOmZ2RB5BcV6BuWV1bUlSeAtbRChzZHRqeJAA): ```rescript let onSubmit = event => { Js.log("submitted") } let onReset = event => { Js.log("resetted")...
# Description My thoughts on these changes are to allow users to manipulate `ReactDOM.Style.t` within ReScript which is not possible nowadays because `ReactDOM.Style.t` is an opaque type. These won't break...
Adding `dataTestId` to ReactDOM props to allow developers to define test id without the need to create a custom component to prop spread the attribute. I picked the default value...
## Context React 18 is in RC and will soon be released: https://github.com/reactwg/react-18/discussions/112 ## Updates - Deprecate `ReactDOM.render` - `ReactDOM.Experimental.createRoot` → `ReactDOM.createRoot` - ~~`ReactDOM.Experimental.createBlockingRoot`~~ - `ReactDOM.Experimental.root` → `ReactDOM.Root.t` - `ReactDOM.Experimental.render`...
The `v1.0` release will introduce more potential breaking changes, due to a new ppx release. - [x] Discuss upcoming changes / upgrade strategy (see [RFC post](https://forum.rescript-lang.org/t/rfc-rescript-react/901)) - [ ] Finish...
→ Removes Jest → Updates peerDependencies ## Test files render ### Setup ### Assertions setup ### Tests ## Test output render
- `ReactDOMRe.objToDOMProps` -> this function is currently missing, probably need to add that back for the transition (later on we will not need that apis for v1 afaik) **Upgrade notes:**...
The Babel JSX compiler converts HTML entities into the unicode characters they represent. In ReScript, we have to use the actual unicode directly. For some characters, like ` ` this isn't...