JihadOmer / baby-name-picker

0 stars 0 forks source link

baby names filter #1

Open JihadOmer opened 1 year ago

JihadOmer commented 1 year ago

The app can not add the names to the filtered box.

`

const NamesList = (props) => {

const { data, filteredText } = props;

    const nameslist = data
  //  .filter((name) => {
  //    // remove the names that do not match the search text
  //    return name.name.indexOf(filteredText) >= 0;
  //  })

   .map((name) => {
     return (
       <li key={name.id} className={name.sex}>
         {name.name}
       </li>
     );
   });

return

{nameslist}
; };

export default NamesList; `

JihadOmer commented 1 year ago

videos explain in class component

https://www.youtube.com/watch?v=A590QnMxsYM&list=PLHrxuCR-0CcT7hgVVlh0lBWTqYkEEF55m&index=9&t=14s&ab_channel=simonswiss