Replies: 3 comments 4 replies
-
Hi Kilari! Thanks ,I'm super excited for where Tetra could go. No discord yet, maybe one day when we've got a little further. For now GitHub discussions is perfect. As you have spotted it's all quite early still. Looking forward to your feedback, and I'm sure you will find some bugs (just seen your pull request so then again you already have!). You will note that there isn't any tests in the repository yet, thats the next job on the to do list. I discovered it much better to get things out there sooner rather than delaying until everything is "done". Let me know if you have any problems when trying stuff out, very happy to help! |
Beta Was this translation helpful? Give feedback.
-
Hi Kilari, Thanks so much for taking the time to give Tetra a go, I really appreciate it. As you have found not everything is there yet.
So there is a couple of things missing currently, first I haven't yet built a way to return a redirect from component public method. There are two options I'm considering, either returning a The other thing missing is a router component, this would allow you to have Tetra do client side URL routing (it would obviously also run on the server). My intention is to reuse the Django urls system, but extend it to understand nested routes. That way you can have nested outlets in your templates, much like the Vue.js router I have most experience with.
This is definitely a browser thing with the back button, I think its just loading the page back out of memory. If you manually change the url it doesn't happen so once we have a redirect method it won't happen. (I downloaded your code and ran it here so I could fiddle with it).
This also relates to your point 4 "components to pass messages to each other" too. As you have spotted there is currently no way to instruct parent component to re-render. The plan is to expose a I also want to make Alpines For going to the other way, passing massages down to child components without having to do it via state I want to potentially use the Alpine.js. (it's a pity that
Eventually, once I have built a router, yes you could built a whole site/app with Tetra, but it's also meant to be possible to just "sprinkled around". I want to tackle both sides, easy to integrate into an existing Django app but also possible to use it to build something completely from scratch.
Thanks, thats the plan. Obviously early days but I believe there is something good here.
I would love that too! I looked into how to do it and it would require (from memory) extending the Python language server. It's not a small job but if Tetra becomes successful enough its definitely on the to do list. What I realy want to do with the extension is make it do intellisense across the JS/Python boundary. So when typing
Yes, also planned. Again thanks for taking the time to have a play with it and writing up some feedback. It all helps to steer where the priorities should be. |
Beta Was this translation helpful? Give feedback.
-
Hey, so I have released a new version that fills a couple missing pieces from my to do list. You can now explicitly call methods of parent components and dispatch events to notify parent components of changes. Docs are here: https://www.tetraframework.com/docs/components#built-in-client-methods. The simplest solution to your parent component not updating is to call You can now redirect from a public method with |
Beta Was this translation helpful? Give feedback.
-
Hey,
Just wanted to say that this looks awesome. I have always tried to put together something like this every time I build something in Django. Gonna play with this over the weekend.
Do you have a discord server or something like that for the community?
Kilari Teja
Beta Was this translation helpful? Give feedback.
All reactions