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

Consolidate Component API with existing code #1056

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Conversation

TimLariviere
Copy link
Member

@TimLariviere TimLariviere commented Jan 15, 2024

The new Component API code was really similar to the existing ViewAdapter code. Both of them were running the view loop to calculate diff and apply the differences to the UI. The main difference is that ViewAdapter was only supporting the root control (eg. IFabApplication) where Component supports any control and any state management system.

graph LR
    A[State]--changes-->B[view function]
    B--applies diff-->C[UI]
    C--triggers a change-->A
Loading

I consolidated the code by removing ViewAdapter and using Component everytime.
To support non-component codebase, UseFabulousApp will now create an implicit Component using the Program passed to it.

@TimLariviere TimLariviere changed the title Refactored components as base of all Fabulous app Consolidate Component API with existing code Jan 16, 2024
@TimLariviere TimLariviere marked this pull request as ready for review January 16, 2024 10:56
@TimLariviere TimLariviere merged commit 7fe2a8d into main Jan 16, 2024
1 check passed
@TimLariviere TimLariviere deleted the refactor-component branch January 16, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant