← Graph

Immutable Form Runtime API

concept 1 connections

Reform 3 runtime API principle: instead of one mutable form instance doing rendering, validation and persistence, every operation is a class method that returns a fresh immutable object — Reform.present returns a presentable form, Reform.validate returns a result object (calling validate twice yields two different result objects), persist returns a mutations object. Borrows from functional programming: 'make the API in a way that you cannot fuck it up anymore.' Directly addresses the Reform 2 misuses where users called validate/save multiple times and mutated form state between calls.

category
pattern
about
Immutable Form Runtime API concept
Core redesign: class methods returning fresh immutable objects for present/validate/persist.

Provenance

Read by
7 extractions