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

Patch Component render function #416

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Apr 12, 2024

  1. Current situation: If the render function of a component closes over/…

    …captures
    
    state that state is stale. This is the case because we never change the render
    function - even tho it's instantiated.
    
    This change makes it possible to access outer state and re-render when captured
    state changes.
    
    This is still a prototype.
    JaggerJo committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    9dcdfa7 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2024

  1. - don't use ref cells, but actually pass the field by reference. This…

    … requires not using an FSharp
    
    function as getting the address of a function type is prevented by the compiler. I guess casting the
    function to an object might have also worked here.
    
    - simplify bindings by passing in the RenderFunctionProperty
    JaggerJo committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    4e8d91d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e9c5035 View commit details
    Browse the repository at this point in the history
  3. first shot at only re-rendering components that have capturing render…

    … functions. This works but is
    
    still a bit messy.
    JaggerJo committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    4231970 View commit details
    Browse the repository at this point in the history
  4. split component into two classes:

    Component: plain old component, unchanged from master
    
    ClosureComponent: component that works well with render function that captures state
    JaggerJo committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    755dec8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    757ac0e View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. Configuration menu
    Copy the full SHA
    42dbcd6 View commit details
    Browse the repository at this point in the history