5 ms·
> ZERO react/JS nonsense. As someone who knows js really well, I love liveview's hooks system. the js interop is the bees knees and lets me save my js chops fo
by cultofmetatron 4y ago
> ZERO react/JS nonsense.
As someone who knows js really well, I love liveview's hooks system. the js interop is the bees knees and lets me save my js chops for where I really need it. Also, I can emit js events that get picked up server side and vice versa. ie: no having to write any ajax calls. My frontend can react to server events with very little boilerplate. Thats a WAY better proposition than merely zero js.
PS: the frontend buildchain is esbuild so you get out of the box support for typescript.
- conradfr 4y agoBut you don't get type checking as part of the build right?
- sb8244 4y agoCorrect. You could rig something up in probably 2-3 days if that was super important for you. I did manual typing at the edges and that sufficed for me.
- conradfr 4y agoWell yes, not sure why I got downvoted, if I use a language called TypeScript it may be because I think type checking is important. Having to call tsc separately from my dev/watch process is not a good developer experience. Same as with ... dialyzer :) But for sure, that would decimate esbuild performances.
- sb8244 4y agoI'm also not sure. I think it's an interesting point that you bring up. My comment on value is mainly one of "all or nothing". I think a manual typing at the edge is probably sufficient for most people. That said, you could implement all of your forms and events as structs or schemas and rig up a piece of the dev process to convert them into types. I think many in Elixir would view it as overkill so it hasn't been done afaik. But I also think it could be implemented very easily and then you'd have end to end typing.
- wstuartcl 4y agoYeah its JS where you want JS and no where else.