Skip to content

Memory Leak #41

@ghost

Description

This component is amazing.
However, I believe it may have a memory leak.

Screen Shot 2019-11-07 at 9 57 03 PM

How I'm using it:

I created a react component as follows:

import React from 'react';
import TextLoop from 'react-text-loop';

const BuiltForBlock = ({
	builtFor,
	A,
	B,
	C,
	D,
	E
}) => (
	<h2 className='title animated-main' style={{ color: builtFor.color }}>
		<span> {builtFor.text} </span>
		<TextLoop springConfig={{ stiffness: 80, damping: 10 }}>
			<span style={{ color: `${A.color}` }}>
				{A.text}
			</span>
			<span style={{ color: `${B.color}` }}>{B.text}</span>
			<span style={{ color: `${C.color}` }}>{C.text}</span>
			<span style={{ color: `${D.color}` }}>{D.text}</span>
			<span style={{ color: `${E.color}` }}>
				<strong>{E.text}</strong>
			</span>
		</TextLoop>
	</h2>
);



BuiltForBlock.defaultProps = {
	A: { color: 'red', text: 'A' },
	B: { color: 'blue', text: 'B' },
	C: { color: 'green', text: 'C' },
	D: { color: 'purple', text: 'D' },
	E: { color: 'orange', text: 'E' },
	builtFor: { color: 'white', text: 'Built For' }
};

export default BuiltForBlock;

Then within another component, I have this one.

However, when switching pages on my react app, I believe it is unmounting mid-transition and not properly closing everything out?

If it is a memory leak, that could be a real issue worth looking into and was hoping to get some insight on how to properly unmount it or call your attention to it to fix.

Cheers :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions