Skip to content

connect function bug ? #1480

Closed
Closed
@banli17

Description

@banli17

What is the current behavior?

i make a Modal,alert:

function alert(options = {}) {
    const div = document.createElement('div')
    div.id = 'modal_' + _uid++
    document.body.appendChild(div)

    if (!store) return

    return ReactDOM.render(
        <Provider store={store}>
            <Modal {...options}/>
        </Provider>
        , div)
}

useage is :

Modal.alert({
    content: <ComponentX />
})

// ComponentX
class ComponentX extends Components{
    render(){
       let {title} = this.props
        return <div>{title}</div>
    }
}
export default connect(state=> state.title)(ComponentX);

my ComponentX inner use connect(state)。

in react-redux 7.1.0 is ok, bug react-redux 7.1.3 is not ok, error is follow:

Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at Object.da (react-dom.production.min.js:3592)

it likes a bug?

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