New bucklescript syntax
This commit is contained in:
parent
8e335314c4
commit
0b3642e08d
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
type formattedString = string;
|
||||
|
||||
[@react.component]
|
||||
@react.component
|
||||
let make = () => {
|
||||
let (date: MomentRe.Moment.t, updateDate) =
|
||||
React.useState(MomentRe.momentNow);
|
||||
|
@ -11,7 +11,7 @@ let make = () => {
|
|||
};
|
||||
|
||||
let handleChange = (event: ReactEvent.Form.t) => {
|
||||
let value: formattedString = ReactEvent.Form.target(event)##value;
|
||||
let value: formattedString = ReactEvent.Form.target(event)["value"];
|
||||
updateDate(_ => {value->MomentRe.momentWithFormat("YYYY-MM-DD")});
|
||||
};
|
||||
|
Loading…
Add table
Reference in a new issue