Mark's Dev Links - Issue #6

This is a post in the Newsletter series.

Weekly newsletter, sent week of 2018-02-26

Hi, and welcome to issue #6 of Mark's Dev Links! This is a weekly-ish email newsletter, focused on the React and Redux ecosystem, and stuff that's caught my attention.

Webpack 4.0 released 🔗︎

Webpack 4 just went final over the weekend. Major highlights:

  • Build speeds appear to be much faster, with beta users reporting builds upwards of 60% faster than 3.x
  • Built-in development and production modes, and "zero-config" sensible defaults out of the box
  • The CommonsChunkPlugin is now deprecated, replaced by a new built-in chunking behavior
  • Support for libraries defining a sideEffects : false flag in their package.json to enable much better tree-shaking for smaller bundles

Note that the docs updates for 4.0 aren't published yet, and some of the popular plugins like HtmlWebpackPlugin have needed temporary forks to be compatible.

Adam Rackis is doing some experimenting with upgrading to Webpack 4, and has been posting tweets about his results, including an improvement in bundle size and a gist comparing the output between v3 and v4.

As a related note, there's a new plugin available called webpack-stylish, which looks like it cleans up the standard Webpack build stats output and makes it easier to read. I'll be giving that a shot on my projects later this week.

Dan and Andrew began teasing some big upcoming changes for React on Saturday. Dan is scheduled to speak at JS Conf Iceland on March 1 (talk entitled "React 16 and Beyond"), and is promising to pull back the curtain on what the React team has been working on lately. Based on the tweets, it seems that the React team has come up with some new async-related APIs that are powerful and productive, but likely to be controversial. They're clearly excited about the changes, and it'll be fascinating to see what they've put together. The conference will be livestreamed on Youtube, so I may have to get up extra early Thursday morning to watch Dan's talk :)

TypeScript and Flow Usage in the React community 🔗︎

There was a great discussion thread this week on the relative merits of TS and Flow and their adoption by React users. In particular, Francois Ward of Hubspot (/u/phoenixmatrix) had some excellent in-depth comments on why they're going to be switching to TS in the near future, and a lot of the tool interop complexities that had prevented them from doing so until now. The whole thread is worth reading.

React Context Optimizations 🔗︎

I previously linked to articles and discussion on the new React context API in issue #2. As a summary, you might want to read Kent C Dodds' overview newsletter/post on the new API.

One of the interesting features of the new API is that it supports a optimization of which context consumers get notified for a given update, based on a bitmasking approach. This post shows both how to use context in general, and gives an example of how to use the bitmasking optimization.

An Engineer's Guide to Communication 🔗︎

Saw this come through my Twitter feed this evening, and it's definitely worth including. Some good short solid advice on how we as engineers can improve our communication skills and team interaction.

Redux Ecosystem 🔗︎

Promise middlewares 🔗︎

A very common use case is to dispatch Redux actions based on the lifecycle of a promise (creation, success/failure). Two of the most popular libraries for this are redux-promise from Andrew Clark and redux-pack from Leland Richardson. redux-promise is extremely short and simple, and simply dispatches actions formatted using the Flux Standard Action (FSA) structure. redux-pack tries to apply more "convention over configuration" over data fetching and promise behavior, and provides more structure for handling updates.

Redux Issues Spotlight 🔗︎

More FAQ Updates 🔗︎

I had a previous "FAQ updates wanted" issue, which was just closed as we'd accomplished most of the items I had listed in there. But, I do have several more links, questions, and topics I want covered in the FAQ, so I opened up a new issue to address those other items. A couple people have volunteered to help add those to the FAQ, but there's plenty more pieces waiting for someone to claim them. If you'd like to help out, just drop a comment in the thread saying which entry you want to work on!

Me, Myself, and I 🔗︎

Pretty quiet week overall. I did finally force myself to sit down and start writing some initial exercises for the Redux workshop in April, and last night I put together a more detailed outline for the workshop's contents. I'm hoping to make good progress on material for the workshop this week. Plus, this is that time of year when there's a lull in what sports are on TV anyway, so I don't have as much reason to be wasting evenings on the couch goofing off with a game on in the background :)

Obligatory Plug 🔗︎

My "Practical Redux" tutorial series is now an interactive course on!. Check it out!

Also, if you're in the New York city area, I'll be doing a "Redux Fundamentals" workshop on April 19-20, with other workshop locations and dates TBD later this year.

This is a post in the Newsletter series. Other posts in this series: