GithubHelp home page GithubHelp logo

gnoff / react-tunnel Goto Github PK

View Code? Open in Web Editor NEW
99.0 99.0 9.0 31 KB

React components and decorators for putting context-like values into context and pulling them out as props

License: MIT License

JavaScript 100.00%

react-tunnel's People

Contributors

gnoff avatar natew avatar nd0ut avatar rt2zz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-tunnel's Issues

New Provider Api

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

  1. should provided forwarding happen by default?

shouldComponentUpdate issue

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)

prop-types warning

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;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.