question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FlipMove not working in production environment

See original GitHub issue

While running tests locally with FlipMove everything seems to work perfectly. Though when deploying to a production environment, Flipmove seems to break the container it’s supposed to render. The error I’m getting is:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of ‘t’

‘t’ appears to be the parent where the child containing the FlipMove tags gets rendered in. I’ve identified this as a FlipMove issue since commenting out the tags works perfectly fine, just without animations.

The list is rendered in a parent component as:

<ListContainer messages={this.state.messages} />

ListContainer:

import FlipMove from 'react-flip-move';
import SingleMessage from './SingleMessage';`

class ListContainer extends React.Component {
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <FlipMove duration={250} easing="ease-out">
                {this.props.messages.map(message => (
                    <SingleMessage
                        key={message.id}
                        message={message}
                    />
                ))}
            </FlipMove> 
        )      
    }
}
export default ListContainer;

React version: ^15.4.2 Flipmove ^3.0.1

An answer or some clarification on this topic would be greatly appreciated. I’ve been searching for alternatives or a way to make this work in production for quite a while now but I just can’t wrap my head around what’s going wrong here. 😅

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
wa0x6ecommented, Apr 24, 2018

Not sure if related, but I am encountering an issue on production too, but not on development.

In my case, there are no error messages, everything work perfectly when adding elements to the list. But when removing element, the list does not update.

Same bug when I tried downgrading to v2

0reactions
joshwcomeaucommented, Aug 18, 2018

Ohh, yeah. React Flip Move doesn’t support functional stateless components.

Weird that it only seems to happen in production 😕 maybe we should add a development warning to catch it sooner.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React flip move not animating - Stack Overflow
Im trying to use react-flip-move but for some reason it does not animates. Plz have ...
Read more >
how to set node_env=test in node js Code Example
how to set node environment variable in windows? ... Check your %PATH% environment variable to ensure no references to Nodejs or npm exist....
Read more >
react-flip-move hero animation - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >
Examples of moves: (a) Simple move; (b) flip move; (c ...
A major challenge in the initial stage of production planning for the steel industry is the material allocation problem (MAP): finding the best...
Read more >
Using Dragonframe 5 - Film & Media Studies
Dragonframe is a production-savvy system with features that help you ... NOTE: If the machine that was activated is no longer working, use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found