Commit 8aefb7f
committed
Generate makeProps and wrapper make for native mode
The new server-reason-react PPX (68070f3e) transforms uppercase JSX
calls from Component.make(~prop, ()) to
Component.make(Component.makeProps(~prop, ())).
styled-ppx's native module generation didn't produce a makeProps
function, causing 'Unbound value Cositas.makeProps' errors.
Fix: for native mode, generate makeProps as a function that captures
all labeled props into a closure (thunk) and a public make wrapper
that invokes the thunk with ?key. The include struct...end pattern
shadows the internal make with the public wrapper.
Also fix the demo server.re to call CSS.style_tag() directly since
it's a plain function, not a React component module.1 parent 712c9a3 commit 8aefb7f
File tree
12 files changed
+2378
-13
lines changed- .cursor/hooks/state
- .opencode
- demo/melange
- documents
- packages/ppx/src
- tasks
12 files changed
+2378
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
0 commit comments