Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@eleventigers
Copy link
Contributor

When view are created via Handlebars view helper, they are added to a memory store like models and collections. Later when BaseView tries to re-attach views to DOM it looks up memory store for the same name view.
I am not sure if using fetcher to hold viewStore is a good idea as fetcher mainly deals with serializeable data. Any ideas where we could store views?

Copy link
Member

Choose a reason for hiding this comment

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

We wouldn't need preventPostInitialize anymore, right?

@spikebrehm
Copy link
Member

I like the approach, however I don't think it's appropriate to use MemoryStore for this; there's no point in holding on to instances of the view after we're done rendering & attaching. If we keep an instance in the store for every view, pretty soon we'll run out of memory after using the app for awhile. It could be a bit simpler to have a ViewStore that purges the cached value after it's been grabbed from the cache.

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