nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.54k stars 181 forks source link

Motilink sometimes doesn't work on android #108

Closed arjendevos closed 2 years ago

arjendevos commented 2 years ago

When using MotiLink in a list, it doesn't always navigate.

We have a MotiLink like this:

<MotiLink href={`/product-detail/${product.id}`}
        animate={React.useMemo(
          () =>
            ({ hovered, pressed }) => {
              "worklet";

              return {
                backgroundColor: hovered || pressed ? "#EDEDED" : "#fff",
              };
            },
          []
        )}>{children}</MotiLink>

We use them in a list and whenever we press on an item we should expect to go to another page. Sometimes it works and we navigate to another page but a lot of times i only see the hover effect and it doesn't navigate.

nandorojo commented 2 years ago

can you show more code? does normal link work? which platform? does your list use keys properly?

nandorojo commented 2 years ago

oh android, I see. when you say sometimes — does it work sometimes?

nandorojo commented 2 years ago

also, are you on the latest version of moti?

arjendevos commented 2 years ago

Yes it works sometimes. I'm using "canary"