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

Expose Component Views #473

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Expose Component Views #473

merged 3 commits into from
Oct 25, 2024

Conversation

mrbinky3000
Copy link
Collaborator

@mrbinky3000 mrbinky3000 commented Oct 25, 2024

What:

I need access to the components directly and not wrapped in WithRouter.

Why:

I am doing this because I was recursively rendering some React Code that uses Pure React Carousel and because of the nature of recursion, the Slide was rendering before CarouselProvider. This was causing an error about missing state / context. I need access to the "raw" view so that I can conditionally wrap Slide in WithRouter HOC only after CarouselProvider has finished rendering and has set up the context.

How:

The components were designed to use the Model -> View approach. We were exposing only the Model (index file for each component responsible for gathering data -- aka a "model" in MVP terminology), now we are exposing the Model and the View components.

Checklist:

  • Documentation added/updated
  • Typescript definitions updated
  • Tests added and passing
  • Ready to be merged

@blmooredev blmooredev merged commit 17423d4 into master Oct 25, 2024
2 checks passed
@blmooredev blmooredev deleted the patch/slide branch October 25, 2024 16:36
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.

2 participants