Skip to content

Commit

Permalink
adding package locks and with the new version of react-scripts, they …
Browse files Browse the repository at this point in the history
…complain if we dont have a browserlist in package.json
  • Loading branch information
bradwestfall committed Feb 12, 2019
1 parent 5239eda commit c919053
Show file tree
Hide file tree
Showing 21 changed files with 99,351 additions and 113 deletions.
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tabWidth: 2
semi: false
singleQuote: true
8 changes: 7 additions & 1 deletion 1-rendering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
2 changes: 1 addition & 1 deletion 1-rendering/src/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const element = (
{DATA.items
.filter(item => item.type === "mexican")
.sort(sortBy("name"))
.map(item => <li>{item.name}</li>)}
.map(item => <li key={item.id}>{item.name}</li>)}
</ul>
</div>
);
Expand Down
8 changes: 7 additions & 1 deletion 2-composition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
2 changes: 1 addition & 1 deletion 2-composition/src/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ReactDOM.render(
<h1>Menu</h1>
<ul>
{items.sort(sortBy("name")).map(item => (
<li>
<li key={item.id}>
{item.name} - <small>${item.price}</small>
</li>
))}
Expand Down
4 changes: 2 additions & 2 deletions 2-composition/src/lecture.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ReactDOM.render(
<ul>
{tacos
.sort((a, b) => b.stars - a.stars)
.map(taco => (
<li style={{ margin: "10px" }}>
.map((taco, i) => (
<li key={i} style={{ margin: "10px" }}>
<button
onClick={() =>
alert(taco.name + " is my favorite!")
Expand Down
2 changes: 1 addition & 1 deletion 2-composition/src/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ let Menu = ({ title, items }) => (
<ul>
{items
.sort(sortBy("name"))
.map(item => <MenuItem item={item} />)}
.map(item => <MenuItem key={item.id} item={item} />)}
</ul>
</div>
);
Expand Down
Loading

0 comments on commit c919053

Please sign in to comment.