-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
9 additions
and
6,108 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,30 +1,11 @@ | ||
module Test.Main where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Aff (Milliseconds(..), delay, launchAff_) | ||
import Effect.Class (liftEffect) | ||
import Effect.Class.Console as Console | ||
import Wire.React.Class as Atom | ||
import Wire.React.Pure as Pure | ||
import Wire.React.Selector as Selector | ||
import Effect.Class.Console (log) | ||
|
||
main :: Effect Unit | ||
main = do | ||
testAtom1 <- Pure.create 2.0 | ||
testAtom2 <- Pure.create 100.0 | ||
testSelector <- | ||
Selector.create | ||
{ select: | ||
do | ||
test1 <- Selector.select testAtom1 | ||
test2 <- Selector.select testAtom2 | ||
pure $ test2 / test1 | ||
, update: mempty | ||
} | ||
_ <- Atom.subscribe testSelector Console.logShow | ||
launchAff_ do | ||
delay $ Milliseconds 2000.0 | ||
liftEffect $ Atom.modify testAtom1 (const 4.0) | ||
delay $ Milliseconds 5000.0 | ||
liftEffect $ Atom.modify testAtom2 (const 50.0) | ||
log "🍝" | ||
log "You should add some tests." |
Oops, something went wrong.