Skip to content

Instantly share code, notes, and snippets.

View rowlandekemezie's full-sized avatar
🏠
Working from home

Rowland I. Ekemezie rowlandekemezie

🏠
Working from home
View GitHub Profile
@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 => {
@rowlandekemezie
rowlandekemezie / prototypalInheritance.js
Last active June 20, 2016 12:47
Awesome use of arguments and prototypal inheritance in javascript
// It's worthy of note that Javascript is not a class-oriented language. It's strength is in its native nature.
// Basically, Javascript is a prototypal language and thus uses prototypal inheritance for its operations.
// The example below is a tip of how the prototypal nature of javascript can be utilized
// Implementing the use of 'arguments' object to pass arguments to a funcion
function foo() {
bar.apply(null, arguments)
}
function bar(){