Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like this approach. I am especially drawn to the idea of making custom components this way but every time I have experimented with this I get burned by the context which has to be passed down through all functions.

A jinja/django template has an implicit context but for nested functions you really have to pass that context down through every function call.

It inevitably ends up just a big dict blob.

You get some typing support in an IDE but nothing really for function parameters.

Maybe I am doing wrong?





htpy supports passing data between multiple levels components with its context (very similar to React):

https://htpy.dev/usage/#passing-data-with-context




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: