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

Rewrite Demo so it doesn't use the a parameterised Model on individual pages #291

Open
berenddeboer opened this issue Jun 22, 2020 · 0 comments

Comments

@berenddeboer
Copy link
Collaborator

The Demo code is not a helpful example for people trying to make multipage apps with a model per page.

This is the current consensus:

Hi @david.pinn I just wanted to chime in and say that I 100% agree with @berenddeboer . The demo is a bad example because it uses the lift pattern to also archieve "services" (ie. communicating back to the app). At the point of time when I wrote it, I thought it would be a good way to do "services," but there are much better approaches like shared-state or what has been called "effects" elsewhere.
It is unfortunate that I did it this way, because the demo suggests that you have to use the lift pattern that way which you do not and you should not.. and the demo is a great resource for people to look at how to use the library and its flawed. So I would appreciate any work that goes towards resolving that.

Even when you have multiple levels in your app:

PS. I have had examples with three levels of nestedness: top level, page, and "big custom components." That is also OK, but you should not propagate the lowest level parameter m to the top level, but rather to the closest level (ie. page model).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant