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

Critical: view.props is missing in docs #81

Open
jrmyio opened this issue Aug 13, 2014 · 3 comments
Open

Critical: view.props is missing in docs #81

jrmyio opened this issue Aug 13, 2014 · 3 comments

Comments

@jrmyio
Copy link

jrmyio commented Aug 13, 2014

Wow, i was completely unaware views can hold props/derived too. That changes the way you build your models a lot!

I think it should be added to the docs asap!

(I'm unaware if "session" is supported too)

@wraithgar
Copy link
Contributor

I don't think the props in view are technically supported. There are things in the view that needed to be stateful, so view extends state and has custom types for element and collection.

What kind of other properties are you finding that you need to store in the view?

@legastero
Copy link

@wraithgar They're intentionally supported. See the form views for good examples of extra view state. Basically any type of widget view will want these.

I vaguely recall convincing Henrik that this sort of behaviour was needed so that I could publish standalone Ampersand models (say a chat message model), and use (derived) view properties to adapt those models to the view's needs.

@HenrikJoreteg
Copy link
Member

Yup views are based on state too. Good point on the docs. Props, session and derived all work. In fact that's how it knows when rendered or not. It has a prop for el.

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

5 participants