Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Element type is invalid: Check the render method of 'StyledComponent'. Problem with animation. #462

Closed
steve-rodri opened this issue Oct 5, 2023 · 1 comment
Assignees

Comments

@steve-rodri
Copy link

Simulator Screenshot - iPhone SE (3rd generation) - 2023-10-05 at 11 43 42

To Reproduce:

Create a new project with:

npm create gluestack

choose "Mobile App" - Expo

you could name it "animation-test"

cd animation-test

Make sure to have the animation plugin installed:

npm i @gluestack-style/animation-plugin

Remove App.tsx and replace with the following:

import { AnimationResolver } from "@gluestack-style/animation-plugin";
import { createStyled } from "@gluestack-style/react";
import { GluestackUIProvider } from "@gluestack-ui/themed";
import { Motion } from "@legendapp/motion";

const styled = createStyled([new AnimationResolver()]);

export const StyledMotionView = styled(Motion.View, {});

export default function App() {
  return (
    <GluestackUIProvider>
      <StyledMotionView />
    </GluestackUIProvider>
  );
}

Start the app and observe the error:

nom start
@ankit-tailor
Copy link
Contributor

ankit-tailor commented Oct 19, 2023

Hey @steve-rodri, We have changed the API for animations. You can check out here.

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

No branches or pull requests

3 participants