import React from 'react' import { connect } from 'react-redux' const TodoList = ({ todos }) => ( <ul> {todos.map(todo => <li key={todo.id}>{todo.text}</li>)} </ul> ) const mapStateToProps = state => ({ todos: state.todos }) export default connect(mapStateToProps)(TodoList)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter