You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-17Lines changed: 0 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -85,12 +85,9 @@ Running a web-compatible recipe:
85
85
86
86
| Node | Web Browser | Recipe | Description |
87
87
| :-: | :-: | - | - |
88
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/AceEditorHalogenHooks/src/Main.purs) - [fixme](recipes/AceEditorHalogenHooks/tryFixMe.md)) |[AceEditorHalogenHooks](recipes/AceEditorHalogenHooks)| A Halogen Hooks port of the ["Ace Editor" Halogen Example](https://github.com/purescript-halogen/purescript-halogen/tree/master/examples/ace). |
89
88
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/AddRemoveEventListenerJs/src/Main.purs) - [fixme](recipes/AddRemoveEventListenerJs/tryFixMe.md)) |[AddRemoveEventListenerJs](recipes/AddRemoveEventListenerJs)| This recipe shows how to add and remove an event listener to an HTML element. |
90
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/AffGameSnakeJs/src/Main.purs) - [fixme](recipes/AffGameSnakeJs/tryFixMe.md)) |[AffGameSnakeJs](recipes/AffGameSnakeJs)| A snake game built using [AffGame](https://pursuit.purescript.org/packages/purescript-game/2.0.0). |
91
89
|:heavy_check_mark:||[AffjaxPostNode](recipes/AffjaxPostNode)| Performs a simple HTTP Post request using the [Affjax](https://pursuit.purescript.org/packages/purescript-affjax/) library. |
92
90
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/BasicHalogenHooks/src/Main.purs)) |[BasicHalogenHooks](recipes/BasicHalogenHooks)| Displays a button that toggles the label to "On" and "Off". |
93
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/BehaviorSuperCircleJs/src/Main.purs)) |[BehaviorSuperCircleJs](recipes/BehaviorSuperCircleJs)| A simplified Super Hexagon clone written with [behaviors](https://pursuit.purescript.org/packages/purescript-behaviors). |
94
91
|:heavy_check_mark:|:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/BigIntJs/src/Main.purs)) |[BigIntJs](recipes/BigIntJs)| This recipe shows how to print, create, and use values of the `BigIntJs` type in either the node.js or web browser console. |
95
92
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/BookHalogenHooks/src/Main.purs)) |[BookHalogenHooks](recipes/BookHalogenHooks)| A Halogen port of the ["HTTP - Book" Elm Example](https://elm-lang.org/examples/book). |
96
93
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/BookReactHooks/src/Main.purs)) |[BookReactHooks](recipes/BookReactHooks)| A React port of the ["HTTP - Book" Elm Example](https://elm-lang.org/examples/book). |
@@ -102,21 +99,14 @@ Running a web-compatible recipe:
102
99
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/CatGifsHalogenHooks/src/Main.purs)) |[CatGifsHalogenHooks](recipes/CatGifsHalogenHooks)| A Halogen port of the ["HTTP - Cat GIFs" Elm Example](https://elm-lang.org/examples/cat-gifs). |
103
100
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/CatGifsReactHooks/src/Main.purs)) |[CatGifsReactHooks](recipes/CatGifsReactHooks)| A React port of the ["HTTP - Cat GIFs" Elm Example](https://elm-lang.org/examples/cat-gifs). |
104
101
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ClockReactHooks/src/Main.purs)) |[ClockReactHooks](recipes/ClockReactHooks)| A React port of the ["User Interface - Clock" Elm Example](https://elm-lang.org/examples/clock). |
105
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ComponentsHalogenHooks/src/Main.purs)) |[ComponentsHalogenHooks](recipes/ComponentsHalogenHooks)| Demonstrates how to nest one Halogen-Hooks-based component inside another and send/receive queries between the two. |
106
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ComponentsInputHalogenHooks/src/Main.purs)) |[ComponentsInputHalogenHooks](recipes/ComponentsInputHalogenHooks)| Each time a parent re-renders, it will pass a new input value into the child, and the child will update accordingly. |
107
102
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ComponentsInputReactHooks/src/Main.purs)) |[ComponentsInputReactHooks](recipes/ComponentsInputReactHooks)| Each time the parent's state updates, it will pass a new prop value into the child, and the child will update accordingly. |
108
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ComponentsMultiTypeHalogenHooks/src/Main.purs)) |[ComponentsMultiTypeHalogenHooks](recipes/ComponentsMultiTypeHalogenHooks)| Demonstrates a component that can communicate with its children that have differing types. |
109
103
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ComponentsMultiTypeReactHooks/src/Main.purs)) |[ComponentsMultiTypeReactHooks](recipes/ComponentsMultiTypeReactHooks)| Demonstrates a parent component with several children components, each with different prop types. |
110
104
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ComponentsReactHooks/src/Main.purs)) |[ComponentsReactHooks](recipes/ComponentsReactHooks)| Demonstrates how to nest one React Hooks-based component inside another and send props from the parent to the child component. |
111
105
|:heavy_check_mark:|:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/DateTimeBasicsLog/src/Main.purs)) |[DateTimeBasicsLog](recipes/DateTimeBasicsLog)| This recipe shows how to use `purescript-datetime` library to create `Time`, `Date`, and `DateTime` values and adjust/diff them. |
112
106
|:heavy_check_mark:|:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/DebuggingLog/src/Main.purs)) |[DebuggingLog](recipes/DebuggingLog)| This recipe shows how to do print-debugging using the `Debug` module's `spy` and `traceM` functions. The compiler will emit warnings to remind you to remove these debug functions before you ship production code. |
113
-
|:heavy_check_mark:||[DiceCLI](recipes/DiceCLI)| This recipe shows how to create an interactive command line prompt that repeatedly generates a random number between 1 and 6. |
114
107
|:heavy_check_mark:|:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/DiceLog/src/Main.purs)) |[DiceLog](recipes/DiceLog)| This recipe shows how to log a random integer between 1 and 6 (representing a roll of a die) in either the node.js or web browser console. |
115
108
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/DragAndDropHalogenHooks/src/Main.purs)) |[DragAndDropHalogenHooks](recipes/DragAndDropHalogenHooks)| A Halogen port of the ["Files - Drag-and-Drop" Elm Example](https://elm-lang.org/examples/drag-and-drop). |
116
109
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/DragAndDropReactHooks/src/Main.purs)) |[DragAndDropReactHooks](recipes/DragAndDropReactHooks)| A React port of the ["Files - Drag-and-Drop" Elm Example](https://elm-lang.org/examples/drag-and-drop). |
117
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/DriverIoHalogenHooks/src/Main.purs)) |[DriverIoHalogenHooks](recipes/DriverIoHalogenHooks)| Demonstrates how to communicate with a Halogen application by sending messages to and receiving messages from the root-level component via the driver. |
118
-
||:heavy_check_mark:|[DriverRoutingHalogenHooks](recipes/DriverRoutingHalogenHooks)| Demonstrates using `hashchange` events to drive the root component in a Halogen application via the driver. |
119
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/DriverWebSocketsHalogenHooks/src/Main.purs) - [fixme](recipes/DriverWebSocketsHalogenHooks/tryFixMe.md)) |[DriverWebSocketsHalogenHooks](recipes/DriverWebSocketsHalogenHooks)| Demonstrates using a WebSocket to drive the main component in a Halogen application. |
120
110
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/FileUploadHalogenHooks/src/Main.purs)) |[FileUploadHalogenHooks](recipes/FileUploadHalogenHooks)| A Halogen port of the ["Files - Upload" Elm Example](https://elm-lang.org/examples/upload). |
121
111
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/FileUploadReactHooks/src/Main.purs)) |[FileUploadReactHooks](recipes/FileUploadReactHooks)| A React port of the ["Files - Upload" Elm Example](https://elm-lang.org/examples/upload). |
122
112
||:heavy_check_mark:|[FindDomElementJs](recipes/FindDomElementJs)| This recipe shows how to find elements in the DOM by using query selectors. |
@@ -133,9 +123,7 @@ Running a web-compatible recipe:
133
123
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ImagePreviewsHalogenHooks/src/Main.purs) - [fixme](recipes/ImagePreviewsHalogenHooks/tryFixMe.md)) |[ImagePreviewsHalogenHooks](recipes/ImagePreviewsHalogenHooks)| A Halogen port of the ["Files - Drag-and-Drop" Elm Example](https://elm-lang.org/examples/drag-and-drop) with an additional feature to display image thumbnails. |
134
124
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ImagePreviewsReactHooks/src/Main.purs)) |[ImagePreviewsReactHooks](recipes/ImagePreviewsReactHooks)| A React port of the ["Files - Image-Previews" Elm Example](https://elm-lang.org/examples/image-previews). |
135
125
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/InterpretHalogenHooks/src/Main.purs)) |[InterpretHalogenHooks](recipes/InterpretHalogenHooks)| Demonstrates how to use a custom monad (in this case, using `ReaderT` with `Aff` as the effect type) for a component, and then interpreting that custom monad back down to `Aff`, so it can be run as a normal component. |
136
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/KeyboardInputHalogenHooks/src/Main.purs)) |[KeyboardInputHalogenHooks](recipes/KeyboardInputHalogenHooks)| This example demonstrates how to selectively capture keyboard events and, more generally, how to use `EventSource`s in Halogen. |
|:heavy_check_mark:|:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/MemoizeFibonacci/src/Main.purs)) |[MemoizeFibonacci](recipes/MemoizeFibonacci)| This recipe demonstrates correct and incorrect use of the [`memoize`](https://pursuit.purescript.org/packages/purescript-memoize/docs/Data.Function.Memoize#v:memoize) function by calculating the fibonacci sequence. |
139
127
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/NumbersHalogenHooks/src/Main.purs)) |[NumbersHalogenHooks](recipes/NumbersHalogenHooks)| A Halogen port of the ["Random - Numbers" Elm Example](https://elm-lang.org/examples/numbers). |
140
128
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/NumbersReactHooks/src/Main.purs)) |[NumbersReactHooks](recipes/NumbersReactHooks)| A React port of the ["Random - Numbers" Elm Example](https://elm-lang.org/examples/numbers). |
141
129
|:heavy_check_mark:|:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ParallelAppMExampleLog/src/Main.purs)) |[ParallelAppMExampleLog](recipes/ParallelAppMExampleLog)| Demonstrates how to use `parSequence`/`parTraverse` and how to define a `Parallel` instance for a `ReaderT r Aff`-based `AppM` monad. |
@@ -145,22 +133,17 @@ Running a web-compatible recipe:
145
133
|:heavy_check_mark:||[RandomNumberGameNode](recipes/RandomNumberGameNode)| This recipe shows how to build a "guess the random number" game using a custom `AppM` monad via the `ReaderT` design pattern and `Aff`, storing the game state in a mutable variable via a `Ref`. |
146
134
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ReadPrintFileContentsConcur/src/Main.purs) - [fixme](recipes/ReadPrintFileContentsConcur/tryFixMe.md)) |[ReadPrintFileContentsConcur](recipes/ReadPrintFileContentsConcur)| A Concur recipe to open a local file and display its content in a web page. |
147
135
|:heavy_check_mark:||[ReadPrintFileContentsNode](recipes/ReadPrintFileContentsNode)| Reads a file's contents and prints it to the console. |
148
-
||:heavy_check_mark:|[RoutingHashHalogenClassic](recipes/RoutingHashHalogenClassic)| This recipe shows how to use `purescript-routing` to do client-side hash-based routing in a Halogen-based single-page application (SPA). |
149
136
||:heavy_check_mark:|[RoutingHashLog](recipes/RoutingHashLog)| This recipe demonstrates hash-based routing with `purescript-routing`. No web framework is used. |
150
137
||:heavy_check_mark:|[RoutingHashReactHooks](recipes/RoutingHashReactHooks)| This recipe shows how to use `purescript-routing` to do client-side hash-based routing in a React-based single-page application (SPA). |
151
-
||:heavy_check_mark:|[RoutingPushHalogenClassic](recipes/RoutingPushHalogenClassic)| This recipe shows how to use `purescript-routing` to do client-side push-state routing in a Halogen-based single-page application (SPA). |
152
138
||:heavy_check_mark:|[RoutingPushReactHooks](recipes/RoutingPushReactHooks)| This recipe shows how to use `purescript-routing` to do client-side push-state routing in a React-based single-page application (SPA). |
153
-
|:heavy_check_mark:||[RunCapabilityPatternNode](recipes/RunCapabilityPatternNode)| A skeletal version of an application structuring pattern using purescript-run and free dsls. |
154
139
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ShapesHalogenHooks/src/Main.purs)) |[ShapesHalogenHooks](recipes/ShapesHalogenHooks)| Demonstrates rendering of SVG shapes. |
155
140
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ShapesReactHooks/src/Main.purs)) |[ShapesReactHooks](recipes/ShapesReactHooks)| Demonstrates rendering of SVG shapes. |
156
141
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/SignalRenderJs/src/Main.purs)) |[SignalRenderJs](recipes/SignalRenderJs)|[Signal](https://pursuit.purescript.org/packages/purescript-signal/10.1.0) demo that responds to user input and elapsed time. |
157
142
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/SignalSnakeJs/src/Main.purs)) |[SignalSnakeJs](recipes/SignalSnakeJs)| A snake game built using [Signal](https://pursuit.purescript.org/packages/purescript-signal/10.1.0). |
158
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/SignalTrisJs/src/Main.purs)) |[SignalTrisJs](recipes/SignalTrisJs)| A [tetromino](https://en.wikipedia.org/wiki/Tetromino) game built using [Signal](https://pursuit.purescript.org/packages/purescript-signal/10.1.0). |
159
143
|:heavy_check_mark:|:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/SimpleASTParserLog/src/Main.purs)) |[SimpleASTParserLog](recipes/SimpleASTParserLog)| This recipe shows how to parse and evaluate a math expression using parsers and a "precedence climbing" approach. |
160
144
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/TextFieldsHalogenHooks/src/Main.purs)) |[TextFieldsHalogenHooks](recipes/TextFieldsHalogenHooks)| A Halogen port of the ["User Interface - Text Fields" Elm Example](https://elm-lang.org/examples/text-fields). |
161
145
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/TextFieldsReactHooks/src/Main.purs)) |[TextFieldsReactHooks](recipes/TextFieldsReactHooks)| A React port of the ["User Interface - Text Fields" Elm Example](https://elm-lang.org/examples/text-fields). |
162
146
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/TicTacToeReactHooks/src/Main.purs) - [fixme](recipes/TicTacToeReactHooks/tryFixMe.md)) |[TicTacToeReactHooks](recipes/TicTacToeReactHooks)| A PureScript port of the official reactjs.org documentation's [Tutorial: Intro to React](https://reactjs.org/tutorial/tutorial.html) example. |
163
-
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/TimeHalogenHooks/src/Main.purs)) |[TimeHalogenHooks](recipes/TimeHalogenHooks)| A Halogen port of the ["Time - Time" Elm Example](https://elm-lang.org/examples/time). |
164
147
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/TimeReactHooks/src/Main.purs)) |[TimeReactHooks](recipes/TimeReactHooks)| A React port of the ["User Interface - Time" Elm Example](https://elm-lang.org/examples/time). |
165
148
|:heavy_check_mark:|:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/ValueBasedJsonCodecLog/src/Main.purs)) |[ValueBasedJsonCodecLog](recipes/ValueBasedJsonCodecLog)| This recipe shows how to use [`codec`](https://pursuit.purescript.org/packages/purescript-codec/3.0.0) and [`codec-argonaut`](https://pursuit.purescript.org/packages/purescript-codec-argonaut/) to write value-based bidirectional JSON codecs to encode and decode examples written in "meta-language." |
166
149
||:heavy_check_mark: ([try](https://try.ps.ai/?github=JordanMartinez/purescript-cookbook/master/recipes/WindowPropertiesJs/src/Main.purs)) |[WindowPropertiesJs](recipes/WindowPropertiesJs)| This recipe shows how to get and print various properties in the browser's `window` object. |
0 commit comments