Skip to content

Don't use view.rendered to determine whether render must be called #25

@kahnvex

Description

@kahnvex

Using view.rendered to determine whether or not to render a view might cause issues with views with bindings that have been rendered once before. There is a discussion on ampersand-view about this.

Some alternatives:

// very naive and hacky way to check if an element is in the DOM
document.contains(view.el);

// Maybe a little better
// When removing an element
view.remove();
delete view.el;

// Set our own property
view.remove();
view.removed = true;

This is a tough problem but I think we can find a solution.

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