https://github.com/dfuenzalida/fetch-demo
An example of using the Fetch API with React, ClojureScript, Reagent and core.async to ease the handling of Promises.
https://github.com/dfuenzalida/fetch-demo
clojurescript core-async react reagent
Last synced: 26 days ago
JSON representation
An example of using the Fetch API with React, ClojureScript, Reagent and core.async to ease the handling of Promises.
- Host: GitHub
- URL: https://github.com/dfuenzalida/fetch-demo
- Owner: dfuenzalida
- License: mit
- Created: 2020-11-26T08:04:36.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-26T21:32:59.000Z (over 5 years ago)
- Last Synced: 2025-09-10T07:01:40.041Z (9 months ago)
- Topics: clojurescript, core-async, react, reagent
- Language: Clojure
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ClojureScript Fetch API demo
An example of using the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) with React, ClojureScript, [Reagent](https://reagent-project.github.io/) and [core.async](https://github.com/clojure/core.async/) to ease the handling of [Promises](https://clojurescript.org/guides/promise-interop).
### Requirements
* [Java](https://adoptopenjdk.net/)
* [NodeJS](https://nodejs.org/)
* [Shadow-cljs](https://shadow-cljs.org/)
* [Yarn](https://yarnpkg.com/)
### Development mode
Navigate to the project folder and run the following commands in the terminal.
To download the NodeJS dependencies run:
```
yarn install
```
Copy the static HTML file to the target folder with:
```
yarn html
```
To start the compiler in watch mode:
```
yarn watch
```
Shadow-cljs will automatically push cljs changes to the browser.
Once the ClojureScript code is compiled, visit http://localhost:8080/
Type in the search box and get results from page names in the english Wikipedia.
### REPL
On watch mode a nREPL will be started on port 37117:
```
$ yarn watch
yarn run v1.22.10
$ shadow-cljs watch app
shadow-cljs - config: /home/denis/Projects/ClojureScript/fabric-todos/shadow-cljs.edn
shadow-cljs - HTTP server available at http://localhost:8080
shadow-cljs - server version: 2.11.7 running at http://localhost:9630
shadow-cljs - nREPL server started on port 37117
shadow-cljs - watching build :app
```
### License
MIT