Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed some comments #6

Merged
merged 1 commit into from
Feb 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 1 addition & 65 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,67 +1,6 @@
// Some import feature for most or all React JS files apparently, pulls from node_modules folder
import React, { useState, useEffect, useReducer } from 'react';

// ************************************************************************************************************************ //
// ARRAY OF STORY OBJECTS (used to be local variable w/in App component, moved out; also used to be a "list" & a global variable)
// ************************************************************************************************************************ //

// ************************************************************************************************************************ //
// ************************************************************************************************************************ //
// COPY FILE & DELETE THIS PART AFTER FINISH THIS LESSON (before committing changes)
// ************************************************************************************************************************ //
// ************************************************************************************************************************ //

// "initialStories" created to allow manipulation of list. (Lesson 1-6, 1/26/23); removed entirely in lesson 1-8.

// const initialStories = [
// {
// title: 'React',
// url: 'https://reactjs.org/',
// author: 'Jordan Walke',
// topic: 'Reactionaries',
// num_comments: 3,
// points: 4,
// objectID: 0,
// },
// {
// title: 'Redux',
// url: 'https://redux.js.org/',
// author: 'Dan Abramov, Andrew Clark',
// topic: 'Sentaries',
// num_comments: 2,
// points: 5,
// objectID: 1,
// },
// {
// title: 'Flummoxed',
// url: 'https://life.js.org/',
// author: "Brendan O'Connor",
// topic: 'Life decisionaries',
// num_comments: 17,
// points: 5,
// objectID: 2,
// },
// ];

// ************************************************************************************************************************ //
// ASYNC DATA FETCHING ///////////////////////////////////////////////////////////////
// ************************************************************************************************************************ //
// Simulation of asynchronous data, will replace later w/real data from an API; "setTimeout" slightly delays the rendering of the list to simulate the real delay that would come w/a network request to a remote API (Lesson 1.7).

// const getAsyncStories = () =>
// new Promise((resolve) =>
// setTimeout(
// () => resolve({ data: { stories: initialStories } }),
// 2000
// )
// );

// ************************************************************************************************************************ //
// ************************************************************************************************************************ //
// COPY FILE & DELETE THIS PART AFTER FINISH THIS LESSON (before committing changes)
// ************************************************************************************************************************ //
// ************************************************************************************************************************ //

// ************************************************************************************************************************ //
// CUSTOM HOOK (useSemiPersistentState) ///////////////////////////////////////////////////////////////
// ************************************************************************************************************************ //
Expand Down Expand Up @@ -211,10 +150,7 @@ const App = () => {
value={searchTerm}
// Added isFocused as prop to pass below (1/24/23 update
isFocused
// // Think what we did here is make this into a prop that pulls down the handleSearch function above
// onInputChange={handleSearch}

// Prop to be used in search button (in place of the above, commented-out handler)
// Prop to be used in search button
onInputChange={handleSearchInput}
>
<strong>Search: </strong>
Expand Down