Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve API and Structure of Components #129

Merged
merged 40 commits into from
Oct 16, 2024

Conversation

WolfyScript
Copy link
Owner

  • Clear separation between NativeComponents and Component Setup Functions

    • Only NativeComponents are actual components present in the model graph
    • Component Setup Functions defined via API to structure and group UI. They only run once and set up the reactive system around NativeComponents
  • Simplify the platform implementations

    • Keep styles separate from components
    • Keep renderer separate from the reactive graph

* Clear separation between NativeComponents and Component Setup Functions
* Better API for components
  * Move things like style and icon settings out of the scope into the properties
  * Reserve receiver functions for component scope specific settings (e.g. Router { <routes> }). Buttons do not need any children for example
@WolfyScript WolfyScript self-assigned this Aug 30, 2024
@WolfyScript WolfyScript added the enhancement New feature or request label Aug 30, 2024
* NativeComponents no longer have a method to add them to the graph
* setup functions create the signals and effects and construct the initial component graph
* Add API for ModelGraph
* Memos now also require an initial value
Renderers and InteractionHandlers can now be picked upon creation of the ViewRuntime, making it easier to compose different kinds of runtimes when another Renderer/InteractionHandler type is available
This separates them even further, so they should work independent of each other in theory
* Use native sponge events for component interaction handlers instead of a weird wrapper
@WolfyScript WolfyScript marked this pull request as ready for review September 14, 2024 16:59
@WolfyScript WolfyScript merged commit 6265434 into master Oct 16, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant