Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

PureComponent doesn't actually compare state #376

@foxydevloper

Description

@foxydevloper

The implementation of PureComponent doesn't actually compare state as documented in https://roblox.github.io/roact/performance/reduce-reconciliation/#purecomponent and https://roblox.github.io/roact/api-reference/#roactpurecomponent

-- In a vast majority of cases, if state updated, something has updated.
-- We don't bother checking in this case.
if newState ~= self.state then
return true
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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