To scale UI development linearly by prioritising on component design in isolation.
At the core is the assumption that complexity in large apps stems from hidden links between parts. Tedious as it can be to uncover each and every component dependency, committing to it promises predictability and long term sanity.
Moreover, React Cosmos tries to answer the question: How to design components that are truly reusable?
For more context see manifesto and problem analysis written back in 2014, before code was written.
The Best Code is No Code At All. Start with this in mind before writing code.
React Cosmos is a monorepo with many small packages. This makes it possible to design isolated units, but also to build and test all packages together (inside one of the examples).
Projects are used to track large releases. Issues are used for everything else.
Issues are first categorised as one of the following:
hmm
Questions and supportoops
Bugsi have a dream
Ideas and feature proposals
Once a draft progresses, it will go through the following phases:
needs love
Accepted ideas without a clear implementation planfree for all
Detailed issues that can be picked up by anyoneon it
Work in progress
A great way to start is by picking up a free for all
issue.
Most of us are doing this for free, so be realistic and don't expect special treatment. The better we communicate the more likely we'll end up collaborating.
Code review aside, also ask for review before implementing solution. Saves everybody time and effort.
git clone [email protected]:react-cosmos/react-cosmos.git
cd react-cosmos
# Install deps and link child packages (using Lerna)
npm install
# Optional: build everything using older React versions
npm run install-react:0.13
# Build example from source and test React Cosmos holistically
cd examples/flatris
npm install
npm start
# Watch & build single package (running example will live reload)
npm run build react-component-playground -- --watch
# Watch & run unit tests as you code
npm run test-jest -- --watch
Use Jest for unit testing. Here are some examples:
Older packages are tested with Mocha and Karma, but those tests are considered legacy.
Make sure npm run lint
passes and add xo to your editor if possible.
Nothing fancy, just the usual the GitHub flow.