Skip to content

Assignment in afterCreate hook being disregarded in React component #2268

@davetapley

Description

@davetapley

Placeholder for linking to in my code, repro incoming 🤞🏻

For now, to be absolutely 100% sure:

The afterCreate hook is a regular action in the sense that:
if I make an assignment in it then it should update the model, right?

I don't see anything saying otherwise in the docs

Because in my app I can see it hitting the afterCreate correctly, and assigning a new value (I'm doing some unit normalization for units), but when I reference the model in a React component I'm still getting the original value.

I see that in reconciliation it says:

If an object is reconciled ... life-cycle hooks are not fired because applying a snapshot results just in an existing tree node being updated

But I'm not doing anything explicit with snapshots, I'm just using Map.put.

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