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

Clean up the view and ViewModel signatures #268

Merged
merged 2 commits into from Jun 29, 2018

Conversation

chasenlehara
Copy link
Member

@chasenlehara chasenlehara commented Jun 27, 2018

This splits the signatures for the two options:

  • String or can-stache.renderer for view
  • Object or constructor function for ViewModel

view signatures

screen shot 2018-06-27 at 1 34 04 pm

ViewModel signatures

screen shot 2018-06-27 at 1 34 26 pm

This splits the signatures for the two options:

- String or can-stache.renderer for `view`
- Object or constructor function for `ViewModel`

For example, every time `<my-tag>` is found, a new instance of `MyTagViewModel` will
be created:
For example, every time `<my-tag>` is found, a new [can-define/map/map] instance
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should be [can-define/map/map DefineMap] to match the link above.

Copy link
Contributor

@phillipskevin phillipskevin left a comment

Choose a reason for hiding this comment

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

I just had one nit-picky comment. Looks good.

@justinbmeyer
Copy link
Contributor

@chasenlehara how do you feel about using ` instead of " for strings?

@chasenlehara
Copy link
Member Author

@justinbmeyer Good, I’ve been using back ticks when it’s multiple lines and sticking to quotes when it’s just a single line. I think a linter (maybe JSHint, not sure?) has trained me not to use back ticks for single lines.

@chasenlehara chasenlehara merged commit 12c065d into master Jun 29, 2018
@chasenlehara chasenlehara deleted the view-model-docs-updates branch June 29, 2018 00:27
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.

None yet

3 participants