Become a React Kung Fu master with us — subscribe to our mailing list!

Robert Pankowecki


Diving into ant-design internals: Button

As a Rails developer, I learned a lot just from reading Ruby on Rails code. Aware of that experience, I try to look into the internals of other open source projects as well, to see what’s going on there.

It has two primary benefits:

  • You will most likely better understand the project, its API and learn a few programming tricks.
  • It demystifies the library or framework that you use.

We often put some open source libraries or frameworks on a pedestal and think that we, mere mortals, cannot produce such code. That it is beyond our level of skills. Reading the code of libraries, that you use, can teach you that many (not always all) parts of their code are approachable and possible to understand. That’s a first step to contribute or start your own project. Feeling empowered that you can. And that you would be useful to the team.

continue reading →

Dynamic JSX tags

For many React developers using JSX it is not clear how to make a dynamic JSX tag. Meaning that instead of hardcoding whether it is input or textarea or div or span (or anything else) we would like to keep it in a variable.

Let’s have a look.

continue reading →

How granular are your redux actions?

I (and I am pretty sure you as well) sometimes get the feeling that there is too much boilerplate when it comes to implementing forms with React and Redux. Connecting actions, validations, state updates and rendering for a simple form can be a tedious job. I know there are people working on good wrappers but I am not sure we are there yet.

I hope that over time we will get better abstractions that will remove this boilerplate for simplest situations. And we will only need to focus on more complex or unusual interactions which differ from the default of “update of this input means update of that property in the state”.

In the meantime I wanted to present (perhaps obvious) techniques that can reduce the amount of code.

continue reading →