-
Auto-reloading (safe-write) issues of application development servers
I have discovered new module bundler for developing applications in JavaScript. It’s called Parcel.js and my initial impressions are positive. That’s what I tweeted about it: https://twitter.com/jernejsila/status/962262223967186944 Parcel is a web application bundler, differentiated by its developer experience. It offers blazing fast performance utilizing multicore processing, and requires zero configuration. Basically a fast Webpack alternative…
-
One-liner for serving static files in Go explained
Whenever I want to set up a server for serving static files in Go, which is not often, I always have to spend some time to figure out the following one-liner. http.Handle(“/images/”, http.StripPrefix(“/images/”, http.FileServer(http.Dir(“./images”)))) What confuses me probably the most here is all three strings being practically the same. So in this post I will…
-
Input validation with Folktale
In this post I’ll show a way to do input validation in JavaScript using Folktale which is a library for functional programming. The beauty of this approach is having validation rules (is required, is email, is confirmed, etc) specified as a callbacks so they can be reused across different forms and also the absence of…
-
The best way of rendering a collection of items in React/Redux
In short The best way to render a collection in React, backed by Redux or other similar library: store a collection as an object where key is item id and value is item itself. That way when rendering collection, pass only item’s id to the item component. Than in item’s connected component query a collection…