Skip to content

Using props in initial data? #41

Closed
@pearofducks

Description

@pearofducks

From the example in README there's:

// use prop values for initial data
  helloMsg = 'Hello, ' + this.propMessage

If I copy the full example into a component and use it, helloMsg is always undefined (even when the prop is set to a string). Should this be the case*? It works in other methods and such, but not in initial data.

*The wording in that comment makes it seem like this should not be undefined. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions