Skip to content

Instantly share code, notes, and snippets.

View ramisalem's full-sized avatar
🎯
Focusing

Rami Bamaas ramisalem

🎯
Focusing
View GitHub Profile
@ramisalem
ramisalem / index.js
Last active January 13, 2020 13:49
Payfort APIs
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.json());
@ramisalem
ramisalem / useInterval.js
Last active July 15, 2020 03:51
interval-hook
import { useState, useEffect, useRef } from 'react';
function useInterval(callback, delay , isRunnig) {
const savedCallback = useRef();
const [id , setId] = useState();
// Remember the latest callback.
useEffect(() => {
savedCallback.current = callback;
}, [callback]);