Skip to content

Handling collections #1

Description

@slimshader

Hi,

first of all: fantastic project, always great to see solutions that promote declarative designs. Looking forward to updates to UniMob.UI too.

Question tho: do I understand correctly that collections (like Todo[] array) have to be replaced entirely for Atom to detect changes? (So basically it should be be treated as immutable collection) As in this would not work as expected, correct?:

[Atom] public List<Todo> Todos { get; set; } = new List<Todo>();
incrementButton.onClick.AddListener(() =>
{
       Todos.Add(new Todo());
});

Atom.Reaction(() => counterText.text = "Unifinished: " + UnfinishedTodoCount);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions