Skip to content

Commit ffc63d4

Browse files
fix: resolve nexted view id error
1 parent fc299b9 commit ffc63d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/default/src/components/NestedView.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export const NestedView: React.FC<NestedViewProps> = ({ depth, breadth = 1, chil
1616
return (
1717
<View style={styles.container}>
1818
<Text>{depth}</Text>
19-
{new Array(breadth).fill(<NestedView breadth={breadth} depth={depth - 1} />)}
19+
{new Array(breadth).fill(null).map((_, index) => (
20+
<NestedView key={index} breadth={breadth} depth={depth - 1} />
21+
))}
2022
</View>
2123
);
2224
};

0 commit comments

Comments
 (0)