Skip to content

Commit fc9e282

Browse files
committed
Added travis config
1 parent 710638e commit fc9e282

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: node_js
2+
3+
node_js:
4+
- "12.14.0"
5+
6+
install:
7+
- npm install
8+
9+
cache:
10+
directories:
11+
- node_modules
12+
13+
script:
14+
- npm run lint
15+
- npm run build

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# react-context-mutex
2+
[![npm version](https://badgen.net/npm/v/react-context-mutex)](https://www.npmjs.com/package/react-context-mutex)
3+
[![Build Status](https://travis-ci.com/marcveens/react-context-mutex.svg?branch=master)](https://travis-ci.com/marcveens/react-context-mutex)
4+
25
A mutex implementation using React and React context. It will prevent a function from running multiple times, until you allow it to run again.
36

47
I created this because I wanted to prevent a fetch from running multiple times after implementing a custom hook in multiple components. The custom hook had a `useEffect` which ran the fetch function.

0 commit comments

Comments
 (0)