Skip to content

Is componentDidMount expected to be called twice? #79

@ghost

Description

Using version 1.2 in Chrome I can see that componentDidMount is getting called twice.

I am doing an Ajax call in the componentDidMount of my component, so this is not ideal. Is this the expected behaviour?

Example:

 <CSSTransitionGroup className='my-container'
                            transitionEnterTimeout={500}
                            transitionLeave={false}
                            transitionName='example'
                            component='div'
                        >
                        <MyComponent location={location} key={getKey(location.pathname)}>

getKey gets a basic, but unique key from React Router

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