Git Product home page Git Product logo

react-component-tree's People

Contributors

nighttrax avatar skidding 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-component-tree's Issues

Warn if no ref is returned for dynamic children

Need

As a developer
I want sensible warnings
So that I can be more productive.

Deliverables

Given I have a component
And it includes the `ReactComponentTree` mixin
And it defines a children method
When I call the method only once during a render cycle
Then no warning will be displayed.
Given I have a component
And it includes the `ReactComponentTree` mixin
And it defines a children method
And it doesn't define a `ref` prop
When I call the method more than once during a render cycle
Then a warning will be displayed.

Solution

Maybe keep a dict of calls that gets reset every render cycle?

/cc @skidding

Not compiled when installed from GitHub

The latest published version of your module is substantially older, so I tried installing from GitHub npm i --save https://github.com/skidding/react-component-tree#4335279 (had to use a commit ref as there are no tags).

This results in Error: Cannot find module 'react-component-tree' on first run. This is because the prepublish is never run when the module is installed like this, and so the dist directory is never created/populated, resulting in a require of a non-existant file.

I've forked and call compile on install, but still can't get the compile command to execute. When installed in this way, babel -d dist/ src/ complains src/ doesn't exist, I'm not sure why.

Looking at how other modules do this,
(use this one-liner to see the npm scripts for each of the modules in your current project that have a dist directory: for i in $( find . -name dist | grep -Eo '\./.++/'); do echo $i; node -e "console.log(require('$i' + 'package.json').scripts)"; done;
it seems that most modules simply commit their dist directories.

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.