npm install
for run app write this code
npm start
# callback function for get data from searchbox.jsx component
const getData = (data) => {
setUpdate(data);
};
# with this useState in App.js (data) will update
const [update, setUpdate] = useState()
#callback function for get data from Button.jsx component (DarkMood/lightMood)
const getMood = (clickMood) => {
setMood(clickMood);
};
# with this useState in App.js (clickMood) will update
const [mood, setMood] = useState();
# function for filter data
function FilterDataSearch() {
if (p.length >= 1) {
return Data.filter((i) => {
i is index
return (i = i.name && i.summary.match(p));
});
}
}
have tow inpute and also one button submit
have A simple card