Successful Search

project image

Search box logic is done! All the blog posts are gathered from a query and the query data is saved in a variable. To display all posts, it just maps the variable and using the spread operator, populates each post. The first to do for the search was to create an input, then set a state and that state to the input's value. An if statement in the index return checks if the title of the post includes what was typed and filters the posts. I'd like to add a filter dropdown and a search by excerpt feature later.