我正在学习 React Native,我想要心跳动画
我这样做了,但这不是好结果,我想要心跳。
如果有人可以帮助我,那就太好了,非常感谢
import React, { PureComponent } from "react";
import { Animated, StyleSheet, Text, View } from "react-native";
export class Loading extends PureComponent {
constructor(props: any) {
super(props);
this.state = {
opacity: new Animated.Value(0),
};
}
public componentDidMount() {
Animated.timing(
this.state.opacity,
{
toValue: 100,
duration: 5000,
},
).start();
}
public render() {
return (
<View>
<View>
<Animated.View
style={[styles.animation, {
opacity: this.state.opacity,
transform: [
{
scale: this.state.opacity.interpolate({
inputRange: [0.5, 1],
outputRange: [1, 0.95],
}),
}]},
]}
/>
</View> …Run Code Online (Sandbox Code Playgroud) 我是反应新手,我想删除卡片数组对象中的第一个元素
<View style={styles.block}>
{
this.props.cards.map((card: ICard) => (
<CardListItem key={card.id} card={card} />
))
}
</View>
Run Code Online (Sandbox Code Playgroud)
我尝试使用this.props.cards.slice(1).map,但它不起作用,如果有人可以帮助我,那就太好了
有人知道如何解决这个问题吗?我有这个
[[1, 2, 3], [5, 4, 3], [2, 0, 1], [2, 3, 4, 1]]
Run Code Online (Sandbox Code Playgroud)
它应该返回这个
5 4 3
2 3 4 1
1 2 3
2 0 1
Run Code Online (Sandbox Code Playgroud)
我正在尝试这段代码
output = sorted(map(lambda a: a, list), reverse=True)
for i in output:
print(' '.join(str(e) for e in i))
Run Code Online (Sandbox Code Playgroud)
但它没有返回好的代码
5 4 3
2 3 4 1
2 0 1
1 2 3
Run Code Online (Sandbox Code Playgroud)