We have once more new chapters in the book. I'm going to try a new model with these. For now the full versions of the testing and typing chapters will be available through Leanpub only. The community version will contain TLDR;s for these so you still get the core points. Of course the project source is public for examination.
By doing this I want to give my supporters a small edge. As a result they'll get the access to the new material first. If it looks like this works, I don't mind developing more content and opening old as new chapters get developed. Consider it as a poor man's Kickstarter. We can even agree on goals if that works better.
Pricing-wise I've bumped the minimum price of the book to $20 as I believe that reflects its current value. I may do another bump later on as I understand how the situation develops.
In total 137 commits went to
v1.8.0. To make it easier to follow what happened and where, I've split up the changes below.
You can see GitHub for all changes.
app. This resolves to the index file within the directory and saves some hassle.
eval. This is consistent with the earlier chapter. In our case we can avoid
eval. Even though it's faster we can afford to go for quality.
resolve.extensionsin detail. Simply put this Webpack property allows us to control the way it matches against files (is it ok to skip extension or not).
.babelrc. This will become even more important in the future as react-transform Babel plugin will replace the current hot loader.
.babelrcbased on env easily. This is important when you want to perform branching based on your build target.
constructor. It simply replaces method contents so these get missed. It would be nice to find a good alternative to those
bindstatements that is performant and works with hot loading.
super()actually does. Simply put it invokes the same method of the parent class.
onEdit. It is currently and undocumented feature. Dmitry Kudryavtsev goes into a good detail at his article The land of undocumented react.js: The Context. React 0.14 will introduce a stable context API and it's worth discussing then.
alt.bootstraprelated exception. It can fail if it receives data it cannot interpret. Better to deal with that than to blow up.
get(ids)more tolerant against missing data. Now it doesn't return possible empty (
undefinedor such) results. Of course getting that sort of data at
localStorageisn't a good idea in the first place but sometimes it's a good idea to be a little defensive.
ItemTypesbelow app/constants/itemTypes.js. Given they are constants that feels like the right place for those. I noticed this while implementing the Redux version of the Kanban.
Note. This change simplified
movelogic somewhat and it goes according to the law of Demeter.
TARGET. Now we can avoid setting
TARGETat package.json as we deduce the target based on npm lifecycle information.
vendorbundles. Now it's easier to see what's going on and, most importantly, why.
ExtractTextPluginrelated gotchas. It won't work through
loaderform. Instead you have to use
loaders: [ExtractTextPlugin.extract('style', 'css!autoprefixer')]or such. If you need to use multiple loaders with it, note the syntax! You should use the
!form in the second parameter to add more if needed.
This is a new chapter! The chapter can likely use some work still. I'll probably cover techniques such as mocking in the future but the basic setup inspired by Cesar Andreu's web-app is there. We also get some tests done so that's good.
This is another new chapter. In the chapter I show how to annotate our project using propTypes. This is one of those steps you should take to solidify your project.
There is a basic introduction to Flow. Unfortunately the current version is missing some functionality our project would need. I have to get back to this later as the tool develops further.
TypeScript will receive JSX support in 1.6. That's another tool I want to cover once it gets out.
npm adduserand mentioned
npm loginalias to clear up confusion.
Given there's a release candidate of React 0.14 out there, it likely doesn't take that long for a final version to appear. This will lead to some important changes in the book. Most importantly it will allow me to default to function syntax for components. In addition I can dig into features such as context.
Once I'm convinced that babel-plugin-react-transform is stable enough and that it works well with the project, I'll change my recommendation to it. It's already worth a look.
I'll also develop the content based on your feedback. The site may receive some small updates. I would love to do something about the highlighting of the code examples and improve the way the are laid out (show added/removed lines better).
I'll write at least one more chapter for my Leanpub readers. The way the situation develops determines the rest.
I hope you enjoy this release. As usual feedback and pull requests are welcome.
I'm still a little conflicted about Amazon and dead tree versions. One option is that I'll do a snapshot (
v2.0.0) that will be published. Leanpub version would then continue from there. Amazon buyers would obviously receive a heavy discount on Leanpub. It's more about reaching more people with the work than anything else.
Remember that you can support my work by purchasing the book at Leanpub. Every little bit counts and allows me to keep it up.