Skip to content

useLayoutEffect is never used in React Native #2011

Open
@aleclarson

Description

@aleclarson

🐛 Bug report

Current Behavior

The implementation of useIsomorphicLayoutEffect leads to useEffect being used in React Native where useLayoutEffect is intended.

More info here: reduxjs/react-redux#1444

Expected behavior

Formik should be calling useLayoutEffect in React Native.

Reproducible example

None yet, as I'm not sure how this bug affects Formik specifically.

Suggested solution(s)

Copy the solution from reduxjs/react-redux#1444 or use react-layout-effect to share code with other libraries (eg: react-spring will be using it).

If you decide to use react-layout-effect, let me know and I'll add you as a maintainer.

Your environment

N/A, all versions affected

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions