State is data that is directly associated with a particular widget. State persists during re-renders, but will be destroyed when an widget is despawned.
State can be created in Kayak easily, here is an example:
Context in Kayak UI allows users to pass data through the widget tree without having to pass data between each widget at every level in the tree.
Typically in Kayak the data is passed top-down or parent to child via "props", but this can be cumbersome when dealing with complex widget trees. Context provides a way to share values from a parent widget down to children without the need to explicitly pass that data through every level of the tree.
...
...
@@ -45,4 +45,4 @@ fn my_child_widget_render(
When a widget is associated with context it's important that the widget update system is aware of this. By default the `widget_update` diff system is used. This accepts types for props and state but not for context. A separate system called `widget_update_with_context` can be used which takes an optional third type for context.
### Important!
`widget_update_with_context` is only designed to work with one type of context. If you need multiple context diffing for a single widget it's advised that you use a custom widget update system.
\ No newline at end of file
`widget_update_with_context` is only designed to work with one type of context. If you need multiple context diffing for a single widget it's advised that you use a custom widget update system.
Kayak UI uses SDF(signed distance fields) for rendering fonts. More specifically it uses multi-channel signed distance fields. Reasons for why we use MSDF:
- High Quality font rendering.
- Fast rendering!
...
...
@@ -25,4 +25,4 @@ Please refer to the documentation found in the link about for generating fonts.