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

Properly merge incoming props #1265

Merged
merged 7 commits into from
Mar 22, 2022
Merged

Properly merge incoming props #1265

merged 7 commits into from
Mar 22, 2022

Commits on Mar 22, 2022

  1. rename inconsistent passThroughProps and passthroughProps to more

    concise `incomingProps`
    
    This is going to make a bit more sense in the next commits of this
    branch, hold on!
    RobinMalfait committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    221be4a View commit details
    Browse the repository at this point in the history
  2. split props into propsWeControl and propsTheyControl

    This will allow us to merge the props with a bit more control. Instead
    of overriding every prop from the user' props with our props, we can now
    merge event listeners.
    RobinMalfait committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    302f5e6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b86d2d2 View commit details
    Browse the repository at this point in the history
  4. improve the merge logic

    This will essentially do the exact same thing we were doing before:
    ```js
    let props = { ...propsTheyControl, ...propsWeControl }
    ```
    
    But instead of overriding everything, we will merge the event listener
    related props like `onClick`, `onKeyDown`, ...
    RobinMalfait committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    a567a10 View commit details
    Browse the repository at this point in the history
  5. fix typo in tests

    RobinMalfait committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    bbd597e View commit details
    Browse the repository at this point in the history
  6. simplify naming

    - Rename `propsWeControl` to `ourProps`
    - Rename `propsTheyControl` to `theirProps`
    RobinMalfait committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    2665eaa View commit details
    Browse the repository at this point in the history
  7. update changelog

    RobinMalfait committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    c3a6931 View commit details
    Browse the repository at this point in the history