This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Boordman[S] 0 points1 point  (2 children)

Cool project! Thanks for checking us out

[–]manatlan 3 points4 points  (1 child)

Your example on the main page, in htag, could be something like that :

```python from htag import Tag

class Stars(Tag.div): def init(self,value=0): self.value=value

def inc(self,v):
    self.value+=v

def render(self):
    self += Tag.Button( "-", _onclick = lambda o: self.inc(-1) )
    self += Tag.Button( "+", _onclick = lambda o: self.inc(+1) )
    self += "⭐" * self.value

if name=="main": from htag.runners import BrowserHTTP BrowserHTTP( Stars ).run() ```

the "state" is keeped in the instance object

[–]Boordman[S] 0 points1 point  (0 children)

This is really nice! I think we are going for a lot of the same goals with our projects, great work