Skip to content

Instantly share code, notes, and snippets.

@rowlandekemezie
rowlandekemezie / ajaxWithReduxSaga.js
Last active January 11, 2024 06:46
A basic implementation of AJAX with redux-saga
const { applyMiddleware, createStore } = Redux;
const createSagaMiddleware = ReduxSaga.default;
const { put, call } = ReduxSaga.effects;
const { takeLatest } = ReduxSaga;
const { connect, Provider } = ReactRedux;
// GitHub API
const gitHubApi = (username) => {
return fetch(`https://api.github.com/users/${username}`)
.then(response => {
;; this file is a walkthrough of Moustache features, a web framework for Clojure
;; http://github.com/cgrand/moustache/tree/master
;; Moustache allows to declare routes, apply middlewares and dispatch on http methods.
;; Moustache is compatible with all frameworks built on Ring, including Compojure
(ns demo
(:use net.cgrand.moustache)
(:use [ring.adapter.jetty :only [run-jetty]])) ;; hmmm Ring without servlets