From 0b3642e08d4f070f3e5d7a11ea5f58cf5d4cebcc Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Wed, 15 Jul 2020 22:21:49 -0400 Subject: [PATCH] New bucklescript syntax --- src/DatePicker/{DatePicker.re => DatePicker.res} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/DatePicker/{DatePicker.re => DatePicker.res} (84%) diff --git a/src/DatePicker/DatePicker.re b/src/DatePicker/DatePicker.res similarity index 84% rename from src/DatePicker/DatePicker.re rename to src/DatePicker/DatePicker.res index 702a437..87550a5 100644 --- a/src/DatePicker/DatePicker.re +++ b/src/DatePicker/DatePicker.res @@ -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")}); };