An Elm Primer for React Developers
/
Part III: Building Real Applications
Part III: Building Real Applications
https://leanpub.com/elm-for-react-devs
Up next
Chapter 9: Organizing Files and Modules
In this part
Chapter 9: Organizing Files and Modules
Moving Beyond the Single-File Approach?
Elm is Different
Let’s Build an Advent Calendar App
Basic Advent Calendar Spec
Starting Simple: The Mock Date Version
Getting the Real Date: Enter Tasks
When to Split: Modules for Data Structures
The Freedom of Safe Refactoring
What We’ve Learned
Chapter 10: Modules Around Data Structures
Opaque Types: Hiding What Shouldn’t Be Seen
Going Further: Phantom Types
The Complete Calendar Module
Using the Calendar Module
What We Gained
The Broader Pattern: State Machines in Types
When to Use Each Pattern
The Freedom to Reorganize
What We’ve Learned
Chapter 11: Forms and Validation
A Simple Contact Form
When Validation Enters the Picture
Finding the Right Abstraction
What We Learned
Chapter 12: Building a Feedback Wizard
The Problem: A Feedback Widget
Modeling the Top-Level State
The OutMsg Pattern
Why OutMsg Works
Native Dialogs and Ports
The Complete Main Module
The Api Module
Patterns Worth Noting
What We Learned