pgarciacamou / react-context-consumer-hoc

HOC that consumes multiple contexts and pass as props to components
MIT License
18 stars 3 forks source link

[feature] v2 (improved notation) #9

Closed pgarciacamou closed 6 years ago

pgarciacamou commented 6 years ago

Fixes #7

Checklist

Short description of what this PR does:

Code example

If [A,B,C] are Context APIs and [a,b,c] are the consumed context, then:

Before:

Now:


This PR also included validations. I opted to remove that feature because the use of invariant, react-is, lodash.isfunction, and lodash.isstring were bloating the size of the library from 2KB to 20KB.