Open in app
Home
Notifications
Lists
Stories

Write
Daniel Steigerwald
Daniel Steigerwald

Home

Dec 23, 2018

The best way to organize CSS

Forget about various methodologies, the best way to organize CSS is plain old function composition. In JavaScript, we have a spread operator for that. Start with a text style, add other styles, and spread as much as possible. That’s all. That’s why CSS (objects) in JavaScript rocks. The example uses React Native style abstraction, but that’s for another article. Using text files for styling? There was unofficial proposal for apply directive, but it died. Maybe some text files preprocessor has a similar feature, but from my perspective, untyped text files for styling is leaky (a lot) abstraction.

Java Script

1 min read

The best way to organize CSS
The best way to organize CSS

Dec 20, 2018

How to migrate huge Flow repository to TypeScript

Flow type checker from Facebook is nice and all, but dead. Long story short, Nuclide died, Atom is dying, Flow is dying too. VSCode can be beautiful and minimal, etc. So, how to migrate of? Use https://github.com/flowtype/flow-remove-types to remove Flow stuff from your code. Rename .js files to .tsx … Profit! OK, it’s not so easy but isn’t hard neither. Check este-typescript for tips. Or hire me. https://javascript-skoleni.com or daniel@steigerwald.cz

Java Script

1 min read


Jan 29, 2018

Always design GraphQL schema for further changes

As graphql.org says, evolve your API without versions. I don’t know how “@deprecated” directive works (TODO: Investigate it). But I know stale not yet updated app can fetch from new updated GraphQL API when API is updated but an app not. Then what? Relay compiler generates Flow types based on GraphQL schema, and leverages GraphQL non-nullable, so app will not crash, instead it will just not render some data. That’s fine, better to be stale than dead. Meanwhile, app should ask for update.

Graph QL

1 min read

Always design GraphQL schema for further changes
Always design GraphQL schema for further changes

Nov 8, 2017

Game changer: Algebraic types

When I am teaching JavaScript and React, often my audience comes from traditional Java or C# world, so I need some sweet spot to justify all new stuff they need to learns, and, which is harder, all old stuff, they have to forget about. Such sweet spot is algebraic types…

Graph QL

2 min read

Game changer: Algebraic types
Game changer: Algebraic types

Sep 16, 2017

React Form Validation without abstraction

Forms are often over-engineered. They don’t have to be. Let’s start with types. Why? Because types help us to think about architecture. Update: In https://github.com/este/este, you will found even more simple and concise and powerful example of modern typed universal validation. Types and validators ValidationError component to render validation error as message Example usage And that’s all. It’s explicit, typed, and clean.

1 min read


Jul 8, 2017

Disabled form state stored in localStorage

Is pretty dangerous pattern because if an app is terminated before the end of some async process, the form will be disabled forever. The same for every temporally value in app state. We have to store disabled form fields state in local storage, to share app state across tabs. Separate local storage and session storage is possible, but hard to code without a lot of boilerplate. We can filter app state after storage rehydration, but again, it’s error prone and hard to implement easily.

Bitcoin

1 min read


Jul 7, 2017

How to fix open source development

If you like what I’m doing with github.com/este/este or whatever, please support further development. Bitcoin Address 15H9wHuJk7RPHfWPPCRtiUEBb7vX1iD7ui Transactions sent and received from bitcoin address 15H9wHuJk7RPHfWPPCRtiUEBb7vX1iD7ui.blockchain.info Thank you.

Este Js

1 min read


Jun 22, 2017

Este strategy for i18n (multiple languages)

Server detects user agent locale and returns internationalized app, if possible. Server doesn’t redirect. With this approach, the same URL provides different content. It means, example.com/about will render both English or Czech content. I believe it’s ok because server also provides language annotations for crawlers. Therefore, cs.example.com/about will work as expected. Both for the user and the crawler.

1 min read


May 21, 2017

The boring React Redux forms

Forms are hard. It’s the same as validation. No magic framework will save us from writing our app code. The wrong abstraction is the wrong abstraction no matter how hard you push the human limits. UPDATE: I made beautiful forms without Redux. Check it 🐕✨. Pokud vás zajímá více, pořádám…

React

3 min read

The boring React Redux forms
The boring React Redux forms

Feb 1, 2017

CSS in JS: The Argument Refined

From CSS to universal typed React UI bootstrap — UPDATE: I revamped design slightly and implementation a lot. Check Este next branch. UPDATE 2: This article is obsolete. Follow github.com/este/este for updates. For years, developers have been fighting with complexity and related bugs of cascading style sheets. I have seen many styles, written in dozens various methodologies or without…

React

7 min read

CSS in JS: The Argument Refined
CSS in JS: The Argument Refined
Daniel Steigerwald

Daniel Steigerwald

JavaScript Developer and Consultant, Este.js Creator, https://javascript-skoleni.com

Following
  • Coinbase

    Coinbase

  • SatoshiLabs

    SatoshiLabs

  • Chain

    Chain

  • Purse

    Purse

  • Dion Almaer

    Dion Almaer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable