Skip to content
狼叔 edited this page Dec 27, 2021 · 3 revisions

Welcome to the stateview wiki!


 childNumber++
        // const childType = { ...child.type }
        // debug(child)
        // console.log(child.name)
        // debug(child.props.state)
        states.push(child.props.state)

        let component = child.props.component

        let vComponent: any = null
        if (props.default) {
            if (props.default == child.props.state) {
                vComponent = component
            }
        } else {
            // if stateview.default is undefined
            // use first child render default
            if (childNumber === 1) {
                vComponent = component
            }
        }
Clone this wiki locally