rescript-react icon indicating copy to clipboard operation
rescript-react copied to clipboard

JSX Changes

Open rickyvetter opened this issue 3 years ago • 3 comments

This is a cross-repo change and so I want to have a place here to comment/get feedback from folks.

In particular I want to remember to take a look at all of the issues/prs tagged html attribute change #38 will land since it's a bug but still needs to be ported over.

rickyvetter avatar Jan 23 '22 17:01 rickyvetter

Is the other repo the syntax repo?

zth avatar Jan 24 '22 12:01 zth

Yup! Here's a (very rough) draft of changes I've chatted about. Needs some cleanup before it's ready for prime time.

https://gist.github.com/rickyvetter/f0076949c610bdfef61c21da686a608e

rickyvetter avatar Feb 24 '22 15:02 rickyvetter

I have a question about prop discoverability.

While I realise the .res file for the dom props is massive, it also makes it easy to see how I misspelled a prop as well as that the prop may not exist (because it's too new in the DOM spec compared to what's implemented in ReScript).

How will discoverability work once all the props have been moved from the ReactDOM.res file which can be opened and inspected, into the PPX (which is opaque)?

Kingdutch avatar May 17 '22 16:05 Kingdutch

@Kingdutch DOM props are now defined as JsxDOM.domProps here in the compiler repo: https://github.com/rescript-lang/rescript-compiler/blob/10.1_release/jscomp/others/jsxDOM.res.

@rickyvetter Closing this issue, as the JSX 4 changes are well underway / almost finished and documented here: https://github.com/rescript-lang/syntax/blob/master/cli/JSXV4.md

cknitt avatar Oct 07 '22 17:10 cknitt