diff --git a/snippets/MappedList.md b/snippets/MappedList.md
index ca7eba5a6..17b9bba5f 100644
--- a/snippets/MappedList.md
+++ b/snippets/MappedList.md
@@ -8,20 +8,11 @@ Use `Array.prototype.map` to render every item in `data` as a `
` element and
Omit the `isOrderedList` prop to render a `` list by default.
```jsx
-function MappedList(props) {
- return props.isOrderedList ? (
-
- {props.data.map((v, i) => (
- - {v.value ? v.value : v}
- ))}
-
- ) : (
-
- {props.data.map((v, i) => (
- - {v.value ? v.value : v}
- ))}
-
- );
+function MappedList({ isOrderedList, data}) {
+ const list = data.map((v, i) => (
+ - {v.value ? v.value : v}
+ ));
+ return isOrderedList ? {list}
: ;
}
```