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

Normal-sized app example #3259

Closed
AndrewIngram opened this issue Apr 7, 2016 · 3 comments
Closed

Normal-sized app example #3259

AndrewIngram opened this issue Apr 7, 2016 · 3 comments

Comments

@AndrewIngram
Copy link

Based on #3232, it seems that the huge-apps example demonstrates a pattern that won't actually be needed by most apps, and actually has a negative performance impact if applied naively.

It seems to me that this example isn't helpful right now, because it demonstrates a pattern most users will never need and probably shouldn't use. Anecdotally, I was certainly under the impression that this was the way to do code-splitting, and would have implemented things in this suboptimal way if @taion hadn't pointed out the issue to me.

I think we need a normal/medium-sized app example that demonstrates the pattern of code-splitting suggested in #3232, and this should be promoted as the encouraged way to implemented code-splitting for most users.

@timdorr
Copy link
Member

timdorr commented Apr 7, 2016

huge-apps does take things a bit to the extreme, but I don't think it's a bad example. You can take pieces from it as it makes sense for your app.

That being said, a more straightforward example would be a good addition. If you want to start a PR, we can work on building out something high quality for others to follow.

@taion
Copy link
Contributor

taion commented Apr 7, 2016

It's not just "to an extreme" – it's actually incorrect. You almost certainly do not want to use both getChildRoutes and getComponents in the way that the example in question does – you end up with waterfalled round trips to the server for no good reason, compromising end-user experience.

That flaw in the huge-apps example was why I opened #3232 in the first place; that the API encourages users to do this and that we demonstrate it in an example is really bad.

@taion taion mentioned this issue Apr 12, 2016
@taion
Copy link
Contributor

taion commented Jul 25, 2016

We don't actually have a meaningfully better pattern available other than the huge-apps one. Will need to resolve #3232 first.

@taion taion closed this as completed Jul 25, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants