Release Summary
- Users can now delete the `public` folder in their PyFyre projects.
- Added `port` and `hostname` arguments on `pyfyre run`.
- The type of `[Element].style` is now `Style` from `Optional[Style]`.
- Implemented `update` and `set` methods on the `Style`.
- Can now pass in multiple values in the `Text` class. All the values are concatenated.
- Implemented `EventState` and `MediaQuery` state dependencies.
**`MediaQuery` example usage:**
py
from pyfyre import render, MediaQuery
from pyfyre.nodes import Node, Widget, Element, Text
mq = MediaQuery("(max-width: 720px)")
class App(Widget):
def build(self) -> list[Node]:
if mq.matches:
return [Element("h1", lambda: [Text("Mobile view")])]
return [Element("h1", lambda: [Text("Desktop view")])]
render({"/": lambda: App(states=[mq])})
---
For more details: [Comparing changes](https://github.com/pyfyre/pyfyre/compare/2d490beaa6bb3db8eaa989ccb97e1fd230b17872...ae1e38aac00e148328bf7a8015a2580cf29a0834)