animate-react-native / animate-react-native/marquee

Marquee list is getting slows down in android and face crashes in production

Open
#16 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
354
Forks
27
PR merge metrics
No merged PRs in 30d

Description

`import React, { memo } from "react";
import { Marquee } from "@animatereactnative/marquee";
import { Image, View } from "react-native";
import { hp } from "../../../utils/dimensions";
import { COLORS } from "../../../theme/color";
import Animated, { FadeInLeft, FadeInRight } from "react-native-reanimated";
import { ANIMIE_IMAGES } from "../../../assets/anime";

const MarqueeList = () => {
const numRows = 4;
const imagesPerRow = Math.ceil(ANIMIE_IMAGES.length / numRows);

const imageGroups = Array.from({ length: numRows }, (_, i) =>
ANIMIE_IMAGES.slice(i * imagesPerRow, (i + 1) * imagesPerRow - 1)
);

return (
<View
style={{
flex: 1,
transform: [{ rotate: "170deg" }, { scale: -1 }],
top: -hp(60),
borderWidth: 0,
borderColor: COLORS.purple,
}}
>
{imageGroups.map((images, rowIndex) => (
<Marquee
key={marquee-${rowIndex}}
spacing={8}
speed={0.4}
style={{ marginTop: 12 }}
reverse={rowIndex % 2 !== 0}
>
<View style={{ flexDirection: "row" }}>
{images.map((image, index) => (
<Box key={box-${rowIndex}-${index}} size={170} spacing={10}>
<Image
entering={(rowIndex % 2 === 0 ? FadeInRight : FadeInLeft)
.duration(500)
.delay(300 * (rowIndex + 1) + Math.random() * 100)}
source={image}
style={{
width: "100%",
height: "100%",
borderRadius: hp(10),
}}
/>

))}


))}

);
};

const Box = ({ children, size = 200, spacing = 0 }) => {
return (
<View
style={{
width: hp(size),
height: hp(size),
marginRight: spacing,
marginBottom: spacing,
borderRadius: hp(10),
justifyContent: "center",
alignItems: "center",
backgroundColor: COLORS.gray_800,
}}
>
{children}

);
};

export default memo(MarqueeList);
`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report provides a MarqueeList snippet but no source filename, Android reproduction steps, crash trace, or test. Begin by reproducing the slowdown and production crash around the four Marquee rows, then inspect the imported Marquee component and related React Native behavior; done means the list no longer slows down or crashes on Android.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.