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

WP-Builder: Feat/nested Navigator context #27

Merged
merged 3 commits into from
Jul 9, 2023

Conversation

bangank36
Copy link
Owner

@bangank36 bangank36 commented Jul 8, 2023

Summary

  • Implement additional context to pass the generated JsonFormDispatch on the nested children along with the path

  • Some notes about terminology:

    • route: used for NavigatorScreen path prop
    • path: used for jsonform path prop
  • Recording
    chrome-capture-2023-6-9 (1)

Reference

#26

@bangank36 bangank36 added the enhancement New feature or request label Jul 8, 2023
@bangank36 bangank36 self-assigned this Jul 8, 2023
Copy link
Owner Author

@bangank36 bangank36 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
and it finally works!! The disclosure views is what I am after for years now come to life

<NavigatorButton path="/">
<p>Go to home</p>
</NavigatorButton>
{ screenContent[route].component }
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we will render the JsonFormDispatch that is sent from the nested prop

// Use the callback since the new state is based on the previous state
setScreenContent(prevScreenContent => ({
...prevScreenContent,
[route]: {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

route is used as path for NavigatorScreen

@bangank36 bangank36 merged commit efbcb6f into main Jul 9, 2023
@bangank36 bangank36 changed the title WP-Builder: Feat/nested rendererer context WP-Builder: Implement Renderer context Jul 19, 2023
@bangank36 bangank36 changed the title WP-Builder: Implement Renderer context WP-Builder: Feat/nested Navigator context Jul 19, 2023
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
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant