diff --git a/sample/use-popcorn/src/App.jsx b/sample/use-popcorn/src/App.jsx
index 9a3a253..05c64de 100644
--- a/sample/use-popcorn/src/App.jsx
+++ b/sample/use-popcorn/src/App.jsx
@@ -51,20 +51,35 @@ const average = (arr) =>
arr.reduce((acc, cur, i, arr) => acc + cur / arr.length, 0);
export default function App() {
+ const [movies, setMovies] = useState(tempMovieData);
+ const [watched, setWatched] = useState(tempWatchedData);
+
return (
<>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
>
);
}
-function NavBar() {
+function NavBar({ children }) {
return (
);
}
@@ -91,42 +106,54 @@ function Search() {
);
}
-function NumResults() {
+function NumResults({ movies }) {
return (
- Found X results
+ Found {movies.length} results
);
}
-function Main() {
- return (
-
-
-
-
- );
+function Main({ children }) {
+ return {children};
}
-function ListBox() {
- const [isOpen1, setIsOpen1] = useState(true);
+function Box({ children }) {
+ const [isOpen, setIsOpen] = useState(true);
return (
-
);
}
-function MovieList() {
- const [movies, setMovies] = useState(tempMovieData);
+// function WatchedBox() {
+// const [watched, setWatched] = useState(tempWatchedData);
+// const [isOpen2, setIsOpen2] = useState(true);
+// return (
+//
+// setIsOpen2((open) => !open)}
+// >
+// {isOpen2 ? "–" : "+"}
+//
+// {isOpen2 && (
+// <>
+//
+//
+// >
+// )}
+//
+// );
+// }
+
+function MovieList({ movies }) {
return (