This repository has been archived by the owner on Sep 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ReasonReact JSX to version 3 (#1279)
* Update bsconfig to jsx 3 * Attempt to update packages * Attempt to update modules * Remove @react.component * Return back link types * Update bs-platform and reason-react * Change type definitions * Update bs-react-helmet * Fix Error page and how it imports * Update link prop types * Update rest of components to jsx 3 * Fix helpers and how props are passed * Change make to default export * Remove deps field * Change type def for HOC
- Loading branch information
Showing
30 changed files
with
170 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
let nothing = ReasonReact.null; | ||
let nothing = React.null; | ||
|
||
let text = ReasonReact.string; | ||
let text = React.string; | ||
|
||
let list = list => list |> Array.of_list |> ReasonReact.array; | ||
let list = list => list |> Array.of_list |> React.array; | ||
|
||
let nodeList = node => node##list |> Array.to_list; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,13 @@ | ||
open Helpers; | ||
|
||
let component = ReasonReact.statelessComponent("Post"); | ||
|
||
[@react.component] | ||
let make = (~message: option(string)=?, _) => { | ||
...component, | ||
render: _self => | ||
<div style={ReactDOMRe.Style.make(~fontSize="80px", ())}> | ||
{switch (message) { | ||
| None => "An error occured" |> text | ||
| Some(msg) => msg |> text | ||
}} | ||
</div>, | ||
<div style={ReactDOMRe.Style.make(~fontSize="80px", ())}> | ||
{switch (message) { | ||
| None => "An error occured" |> text | ||
| Some(msg) => msg |> text | ||
}} | ||
</div>; | ||
}; | ||
|
||
let default = | ||
ReasonReact.wrapReasonForJs(~component, jsProps => | ||
make(~message=?Js.Nullable.toOption(jsProps##message), [||]) | ||
); | ||
let default = make; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@phenomic/cli", | ||
"refmt": 3, | ||
"reason": { | ||
"react-jsx": 2 | ||
"react-jsx": 3 | ||
}, | ||
"sources": [ | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@phenomic/core", | ||
"refmt": 3, | ||
"reason": { | ||
"react-jsx": 2 | ||
"react-jsx": 3 | ||
}, | ||
"sources": [ | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.