Skip to content

Commit

Permalink
Update react-basic
Browse files Browse the repository at this point in the history
  • Loading branch information
megamaddu committed Jan 25, 2019
1 parent c7e1eb7 commit 83c1186
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 237 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"purescript-prelude": "^4.1.0",
"purescript-react-basic": "^5.0.0",
"purescript-react-basic": "^8.0.0",
"purescript-nullable": "^4.0.0",
"purescript-promises": "^3.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"react-dom": "^16.4.0"
},
"devDependencies": {
"browserify": "^16.2.2"
"browserify": "16.2.3"
}
}
6 changes: 4 additions & 2 deletions examples/basic/src/Basic.purs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Prelude
import Data.Array ((!!), drop, mapWithIndex, take)
import Data.Foldable (for_)
import Data.Maybe (Maybe(Nothing), fromMaybe, maybe)
import React.Basic (Component, JSX, StateUpdate(..), createComponent, fragment, make, send)
import React.Basic (Component, JSX, StateUpdate(..), createComponent, fragment, make, runUpdate)
import React.Basic.DOM as R
import React.Basic.DOM.Events (targetChecked)
import React.Basic.Events as Events
Expand All @@ -26,7 +26,7 @@ component :: Component Unit
component = createComponent "TodoExample"

todoExample :: JSX
todoExample = unit # make component { initialState, update, render }
todoExample = unit # make component { initialState, render }
where
initialState =
{ todos:
Expand All @@ -48,6 +48,8 @@ todoExample = unit # make component { initialState, update, render }
else t
}

send self = runUpdate update self

render self =
dndContext $
fragment
Expand Down
Loading

0 comments on commit 83c1186

Please sign in to comment.