Skip to content

Commit 76cbda1

Browse files
committed
Switch to @rescript/react
1 parent 5930551 commit 76cbda1

File tree

13 files changed

+72
-57
lines changed

13 files changed

+72
-57
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# History
22

3+
## 4.0.0-beta.1
4+
* **[ BREAKING ]** Switch to `@rescript/react`.
5+
* **[ BREAKING ]** Update `bs-platform`.
6+
37
## 3.0.0
48
* **[ BREAKING ]** Replace `bs-log` with `res-logger`.
59
* **[ BREAKING ]** Move `bs-webapi` to peer dependensies.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![build status](https://img.shields.io/travis/alexfedoseev/re-dnd/master.svg?style=flat-square)](https://travis-ci.org/alexfedoseev/re-dnd)
55
[![license](https://img.shields.io/npm/l/re-dnd.svg?style=flat-square)](https://www.npmjs.com/package/re-dnd)
66

7-
Drag & drop for [`reason-react`](https://reasonml.github.io/reason-react/).
7+
Drag & drop for [`@rescript/react`](https://reasonml.github.io/reason-react/).
88

99
## Features
1010
* Vertical lists

bsconfig.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@
1111
"subdirs": true
1212
}
1313
],
14-
"bs-dependencies": ["reason-react", "bs-webapi", "res-logger"],
15-
"bs-dev-dependencies": ["re-classnames"],
14+
"bs-dependencies": [
15+
"@rescript/react",
16+
"bs-webapi",
17+
"res-logger"
18+
],
19+
"bs-dev-dependencies": [
20+
"re-classnames"
21+
],
1622
"reason": {
1723
"react-jsx": 3
1824
},

examples/App.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let reducer = (_state, action) =>
1212

1313
[@react.component]
1414
let make = () => {
15-
let url = ReasonReactRouter.useUrl();
15+
let url = RescriptReactRouter.useUrl();
1616
let route = React.useMemo1(() => url->Route.fromUrl, [|url|]);
1717

1818
let (state, dispatch) = reducer->React.useReducer({mobileNavShown: false});

examples/Route.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type t =
77
| NestedVerticalLists;
88

99
let fromUrl = url =>
10-
ReasonReactRouter.(
10+
RescriptReactRouter.(
1111
switch (url.hash) {
1212
| "vertical-list" => VerticalList
1313
| "horizontal-list" => HorizontalList

examples/components/Control.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
let make =
33
(
44
~className="",
5-
~style: option(ReactDOMRe.Style.t)=?,
5+
~style: option(ReactDOM.Style.t)=?,
66
~onClick: option(ReactEvent.Mouse.t => unit)=?,
77
~onMouseDown: option(ReactEvent.Mouse.t => unit)=?,
88
~onTouchStart: option(ReactEvent.Touch.t => unit)=?,

examples/components/Link.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ let make = (~path, ~active, ~children) => {
33
<button
44
type_="button"
55
className=Cn.("link" + "active"->on(active))
6-
onClick={_ => ReasonReactRouter.push("#" ++ path)}>
6+
onClick={_ => RescriptReactRouter.push("#" ++ path)}>
77
children
88
</button>;
99
};

examples/components/Nav.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
let make = (~route, ~mobileNavShown, ~hideMobileNav) => {
33
<nav className=Cn.("shown-mobile"->on(mobileNavShown))>
44
<header>
5-
<h1 onClick={_ => ReasonReactRouter.push("/")}>
5+
<h1 onClick={_ => RescriptReactRouter.push("/")}>
66
"re-dnd"->React.string
77
</h1>
88
<a href="https://github.com/alexfedoseev/re-dnd" className="github-link">

examples/index.re

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
ReactDOMRe.renderToElementWithId(<App />, "app");
1+
switch (ReactDOM.querySelector("#app")) {
2+
| Some(root) => ReactDOM.render(<App />, root)
3+
| None => failwith("DOM node `#app` not found")
4+
};

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "re-dnd",
33
"version": "3.0.0",
4-
"description": "Drag-n-drop for reason-react",
4+
"description": "Drag-n-drop for @rescript/react",
55
"main": "src/Dnd.re",
66
"author": "Alex Fedoseev <[email protected]>",
77
"license": "MIT",
@@ -26,6 +26,8 @@
2626
],
2727
"keywords": [
2828
"react",
29+
"rescript",
30+
"rescript-react",
2931
"reason",
3032
"reason-react",
3133
"reasonml",
@@ -43,19 +45,19 @@
4345
"res-logger": "2.0.0-beta.2"
4446
},
4547
"peerDependencies": {
48+
"@rescript/react": ">=0.10.1",
4649
"bs-platform": ">=7.1.1",
47-
"bs-webapi": ">=0.15.9",
48-
"reason-react": ">=0.8.0"
50+
"bs-webapi": ">=0.15.9"
4951
},
5052
"devDependencies": {
53+
"@rescript/react": "0.10.1",
5154
"autoprefixer": "9.8.6",
52-
"bs-platform": "8.4.2",
55+
"bs-platform": "9.0.0",
5356
"bs-webapi": "0.19.1",
5457
"bsb-js": "1.1.7",
5558
"parcel-bundler": "1.12.4",
5659
"re-classnames": "5.0.1",
5760
"react": "17.0.1",
58-
"react-dom": "17.0.1",
59-
"reason-react": "0.9.1"
61+
"react-dom": "17.0.1"
6062
}
6163
}

0 commit comments

Comments
 (0)