by kreetx · 4y ago · 0 comments
Also, given that they write about web technologies, then their static site returns a blank page when js is not enabled..
Basically, the message is: Avoid having components with local state, especially if it needs to be synchronized with the parent. Instead have one central place to handle state. Which is generally good advice and not really that Elm specific.
At least this works well for us when building a web client, but I can't speak to how easy it is if you're using that architecture for other purposes.
It's true that the DOM is very stateful, even when we're writing "stateless" Elm code though. But this is something one needs to know regardless of what kind of components we write.
What elms lacks is mutation of that state - you never change it, but only have a function taking the old state, and returning the new state. Thus every change is atomic, and you can record each change and in the debugger travel back and forth in time.
Maybe calling immutable programming “stateless” is a misnomer, but “immutable state” would be better.
Seems like a log management company that mostly writes about security and devops, not really a "web technology" site
Anyway, it probably isn't much of an issue to them, but, to hide the bottom popup Firefox's reader mode didn't work, so tried disabling js and discovered the issue. Gatsby does seem to have SSR though, so perhaps it's easily doable should they want to.