jondot / ReactNativeKatas
- суббота, 25 июня 2016 г. в 03:13:59
JavaScript
This is a project that lets you participate in a fully-immersive, hands-on, and fun learning experience for React Native.
This is a project that lets you participate in a fully-immersive, hands-on, and fun learning experience for React Native.
We will focus solely about design and styling for React Native, making this a perfect learning aid for both programmers and designers that previously handled Sass or CSS.
This is a Kata. For programming, this means a way to practice something, which is simple enough. However, traditionally programming katas or programming Koans are made to "learn the hard way".
Learning "the hard way" primes your brain to receive information and accelerates the learning process considerably on the expense of frustration.
This process, like many other Kata or Koan based projects, aims to give you the best experience possible so that you can fail with a nice safety net and learn from your failures quickly.
For this, we use:
I assume you already have a working react-native setup.
npm i
and then run the project via Xcode or react-native
You will then be faced with the first Kata.
.test
version of your Kata and edit away. The reference
Kata is the one without the .test
suffix.FillAll
under the flex
subject, will be at src/katas/flex/FillAll.test.js, and
the reference Kata will be at src/katas/flex/FillAll.jsAt any point in time, you can click on your view to show the reference view, and click again to go back.
If you've successfully solved the current view, you'll be automatically progressed to the next Kata.
Learn by making mistakes ("The Hard Way"). By making mistakes, you're priming your brain to receive and retain data in a much better way than reading a book or watching a video.
Use the tips in the .test
versions of the components. Sometimes there will be
tips, sometimes there won't be. Some times the tips will be somewhat opaque,
sometimes very revealing.
The reference components won't have a test
suffix. You'll be able to find
solutions there and if a concept is first introduced or demands a special
explanation - it will be explained inline for your convenience, look for
the Did you know?
sections, Hints
sections, and TODO
notes.
You're more than welcome to submit new katas. Please see the kata building doc for details.
There's a reference Kata, and a test Kata (the one you fiddle with). They're wrapped with a special snapshotting component that exists within the runner infrastructure.
With that, a reference Kata is mounted, rendered, snapshotted (visually), and then your test Kata goes through the same process. We then diff the two snapshots to see if the designs match for your Kata to be marked as solved.
So, this is not the regular testing framework you'd expect.
That was done because design needs creative freedom. This means there's more than one way to solve a Kata, as long as you get the same visuals!
This also means that you're welcome to make forks with better solutions, and offer these as the de-facto reference Katas for next generations to come!