paldepind / functional-frontend-architecture

A functional frontend framework.
MIT License
1.44k stars 87 forks source link

Support: Groom Zip Codes Future Example #25

Closed seanstrom closed 2 years ago

seanstrom commented 5 years ago

Hey @paldepind 👋 I've enjoyed reading through this project and studying the code examples. Great stuff! The other day I was reading through the zip codes future example and realized that the code was executing fetch requests before calling .fork on the Future. I made a change that should fix this and keep all IO pure until it reaches main, which I believe is the goal here 🙌.

I've also included some commits to clean up the example a bit, such as:

I also have optional commits in a separate branch that will (if you're interested):