Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
data={this.props.posts}
testID="posts-list"
keyExtractor={this.postKeyExtractor}
renderItem={this.renderItem}
/>
);
}
}
function mapStateToProps() {
return {
posts: postsStore.getPosts()
};
}
export default connect(mapStateToProps)(PostsList);
const styles = StyleSheet.create({
image: {
width: 54,
height: 54,
borderRadius: BorderRadiuses.br20,
marginHorizontal: 14,
backgroundColor: Colors.purple70
},
border: {
borderBottomWidth: StyleSheet.hairlineWidth,
borderColor: Colors.dark60,
}
});
renderText(txt) {
return (
);
}
}
function mapStateToProps() {
return {
name: store.getters.getName(),
age: store.getters.getAge()
};
}
module.exports = connect(mapStateToProps)(MyComponent);
import { AddPackingItem } from "packlist-components";
import { connect } from "remx";
import { store } from '../remx/store';
function mapStateToProps(ownProps) {
return {
value: store.getNewItemText(),
setNewItemText: (e) => store.setNewItemText(e.target.value),
addItem: store.addItem,
clear: store.clear
};
}
export default connect(mapStateToProps)(AddPackingItem);
bg-red70
fullWidth
onPress={this.onPostDeletePressed}
/>
);
}
}
function mapStateToProps(props) {
return {
post: postsStore.getPost(props.postId)
};
}
export default connect(mapStateToProps)(ViewPost);
import { SimpleList } from "packlist-components";
import { connect } from "remx";
import { store } from '../remx/store';
function mapStateToProps(ownProps) {
return {
value: store.getItems()
};
}
export default connect(mapStateToProps)(SimpleList);