Software Unscripted cover image

React Hooks Design Review

Software Unscripted

CHAPTER

The Importance of a Pure Function in Elm HTML Test

Elm HTML test is like you literally call the function it gives you back the virtual DOM data structure then you can write tests on it. I don't recall having something like that in react back when I used it but it seems like unless you have extracted out like an actually pure function then it's hard to have something like that. You inevitably need some amount of runtime stuff going on and setting some state and things like that so yeah there has to be some like scaffolding around  when you handed a component and say render this for me It still is like inspectable from a testing perspective but it's harder to mock it's harder than before.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner