skidding / react-component-tree Goto Github PK
View Code? Open in Web Editor NEWSerialize and reproduce the state of an entire tree of React components.
License: MIT License
Serialize and reproduce the state of an entire tree of React components.
License: MIT License
As a developer
I want sensible warnings
So that I can be more productive.
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.
Maybe keep a dict of calls that gets reset every render cycle?
/cc @skidding
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.
Does any resemblence of this module still exist in react-cosmos? I looked and can't find any
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.