Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serious Memory Leak when show/disappear <Picker> Component #867

Open
kyle-w-20230331 opened this issue Sep 26, 2023 · 0 comments
Open

Serious Memory Leak when show/disappear <Picker> Component #867

kyle-w-20230331 opened this issue Sep 26, 2023 · 0 comments

Comments

@kyle-w-20230331
Copy link

Here is the simple code

import Picker from "@emoji-mart/react";
import {useEffect, useState} from "react";

function App() {
    const [show, setShow] = useState(true);
    useEffect(() => {
        const timer = setInterval(() => {
            setShow((show) => !show);
        }, 500);
        return () => clearInterval(timer);
    }, []);

    return (
        <div className="container">
            <div className="picker">
                {show ? <Picker/> : <span>Emoji mart test</span>}
            </div>
        </div>
    );
}

export default App;

When the app start up:

Screenshot 2023-09-26 at 07 21 33

After some minutes: (The memory is keep growing forevery)
Screenshot 2023-09-26 at 07 27 38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant