Description
During the refactoring of the state provider logic into component.Abstract, it was identified that createBindings() is called from two separate lifecycle methods: initConfig() and onConstructed().
The call sequence is as follows:
Neo.create()
constructor() -> construct()
initConfig() -> createBindings()
onConstructed() -> createBindings() (redundant)
initConfig() runs first, during the initial construction and configuration of the component. onConstructed() is called by Neo.create() after the constructor chain has completed.
Since initConfig() already sets up the necessary bindings based on the component's configuration, the subsequent call in onConstructed() is redundant and serves no purpose. It attempts to create the same bindings a second time.
Task
Remove the redundant call to this.getStateProvider()?.createBindings(this) from the onConstructed() method within src/component/Abstract.mjs. The call within initConfig() should remain as it is the correct and sufficient place for this logic.
Affected Files
src/component/Abstract.mjs
Description
During the refactoring of the state provider logic into
component.Abstract, it was identified thatcreateBindings()is called from two separate lifecycle methods:initConfig()andonConstructed().The call sequence is as follows:
Neo.create()constructor()->construct()initConfig()->createBindings()onConstructed()->createBindings()(redundant)initConfig()runs first, during the initial construction and configuration of the component.onConstructed()is called byNeo.create()after the constructor chain has completed.Since
initConfig()already sets up the necessary bindings based on the component's configuration, the subsequent call inonConstructed()is redundant and serves no purpose. It attempts to create the same bindings a second time.Task
Remove the redundant call to
this.getStateProvider()?.createBindings(this)from theonConstructed()method withinsrc/component/Abstract.mjs. The call withininitConfig()should remain as it is the correct and sufficient place for this logic.Affected Files
src/component/Abstract.mjs