NAZAR ILKIV <ni@codemotion.eu>

Javascript Ninja

November 21, 2017

Dealing with Redux Form

Take it easy!

About Project

Problems to solve

- Lot of input fields within same UI

- Dynamic validation of optional blocks

- Nested response/payload object

- Inputs normalization

- Calculated fields

Lot of input fields within same UI

Solution

Create form wizard with separate forms having their own fields configuration

The Problem

Nested response/payload object

Solution

Use "." as separator in fields naming

The Problem

The Problem

Solution

Fields names that starts from number char breaks down form validation

Flatten response object with amending numerical keys and then unfatten it

The Problem

Solution

Dynamic validation of optional blocks

Create middleware and trigger form re-render

The Problem

Solution

Inputs normalization

Create wrapper component (hack-a-trick)

The Problem

Solution

Calculated fields

Helper functions with `dispatch` as the parameter

Q&A Time

Made with Slides.com