gnoff / react-tunnel Goto Github PK
View Code? Open in Web Editor NEWReact components and decorators for putting context-like values into context and pulling them out as props
License: MIT License
React components and decorators for putting context-like values into context and pulling them out as props
License: MIT License
remove configuration props {forwardProvided, allowOverload}
Stop auto-providing arbitrary props on Provider
add new Provider prop: provide: (parentProvided) => provided | plainObject
if provide is a function it receives the the provided
in context (only makes sense if this Provider is nested) and returns an object to be provided. It would be up to the caller to forward some/all/no parent provided values.
if the Provider is top level then parentProvided will be undefined
if provide is an object then that object will be provided in this provider. This means that to forward props from parent providers you must do so explicitly
Questions
My injected component was not rerendering. I believe based on cursory review that inject should be using shallowEqualScalar
on both provided and props (instead of shallow equal on just provided)
Get this when using react-tunnel:
Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
from:
function createProvider(React) {
var Component = React.Component;
var PropTypes = React.PropTypes;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.