Reactant icon indicating copy to clipboard operation
Reactant copied to clipboard

Possible code duplication?

Open MatyasKriz opened this issue 8 years ago • 0 comments

At ComponentDelegate.swift:84 we have this:

public weak var ownerComponent: COMPONENT? {
    didSet {
        needsUpdate = stateStorage != nil
    }
}

If I understand the implementation correctly, we want to set needsUpdate to true if the component has a componentState, why isn't then this variable used?

public var hasComponentState: Bool {
    return stateStorage != nil
}

MatyasKriz avatar Oct 12 '17 12:10 MatyasKriz