Skip to content

Show how to make components #57

@mantoni

Description

@mantoni

I’m using the “old” way of registering onload / onunload event handlers to initialize a component store (through emit(‘store:event’)).

This is not directly supported by Choo anymore, but is certainly possible by using some other libraries or native functions.

For example, I have a parameterized route, and based on the parameter I need to fetch some data to show. Likewise, when the user navigates somewhere else, I want to clear the store state to avoid showing “old” information or flickering when the user navigates to the same route again later.

I’d love to see docs describing the recommended way of doing this.

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