
Svelte / Vue / Elixir / React / Linux
- Tweets678
- Following566
- Followers181
- Likes4.5K
![import React, { useState } from "react"; const App = () => { const cats = [ { id: "J---aiyznGQ", name: "Keyboard Cat" }, { id: "z_AbfPXTKms", name: "Maru" }, { id: "OUtn3pvWmpg", name: "Henri The Existential Cat" } ]; const [search, setNewSearch] = useState(""); const handleSearchChange = (e) => { setNewSearch(e.target.value); }; const filtered = !search ? cats : cats.filter((cat) => cat.name.toLowerCase().includes(search.toLowerCase()) ); return ( <> <h2>Cats</h2> Filter cats:{" "} <input type="text" value={search} onChange={handleSearchChange} /> <h2>Videos</h2> <ul> {filtered.map((cat) => { return ( <li> <a key={cat.id} href={cat.id}> {cat.name} </a> </li> ); })} </ul> </> ); }; export default App;](https://pbs.twimg.com/media/FCUqyrNWQAIUN2B.jpg?name=small&format=webp)
ALT import React, { useState } from "react"; const App = () => { const cats = [ { id: "J---aiyznGQ", name: "Keyboard Cat" }, { id: "z_AbfPXTKms", name: "Maru" }, { id: "OUtn3pvWmpg", name: "Henri The Existential Cat" } ]; const [search, setNewSearch] = useState(""); const handleSearchChange = (e) => { setNewSearch(e.target.value); }; const filtered = !search ? cats : cats.filter((cat) => cat.name.toLowerCase().includes(search.toLowerCase()) ); return ( <> <h2>Cats</h2> Filter cats:{" "} <input type="text" value={search} onChange={handleSearchChange} /> <h2>Videos</h2> <ul> {filtered.map((cat) => { return ( <li> <a key={cat.id} href={cat.id}> {cat.name} </a> </li> ); })} </ul> </> ); }; export default App;
![<script> const cats = [ { id: "J---aiyznGQ", name: "Keyboard Cat" }, { id: "z_AbfPXTKms", name: "Maru" }, { id: "OUtn3pvWmpg", name: "Henri The Existential Cat" } ]; let search; $: filtered = !search ? cats : cats.filter(cat => cat.name.toLowerCase().includes(search.toLowerCase())); </script> <h2>Cats</h2> Filter cats: <input type="text" bind:value={search} /> <h2>Videos</h2> <ul> {#each filtered as cat} <li> <a key={cat.id} href={cat.id}> {cat.name} </a> </li> {/each} </ul>](https://pbs.twimg.com/media/FCUp-ClWQAQpcXN.jpg?name=small&format=webp)
ALT <script> const cats = [ { id: "J---aiyznGQ", name: "Keyboard Cat" }, { id: "z_AbfPXTKms", name: "Maru" }, { id: "OUtn3pvWmpg", name: "Henri The Existential Cat" } ]; let search; $: filtered = !search ? cats : cats.filter(cat => cat.name.toLowerCase().includes(search.toLowerCase())); </script> <h2>Cats</h2> Filter cats: <input type="text" bind:value={search} /> <h2>Videos</h2> <ul> {#each filtered as cat} <li> <a key={cat.id} href={cat.id}> {cat.name} </a> </li> {/each} </ul>














![Boardroom suggestion meme. Boss: “Remote workers hate meetings. We need to boost morale!” Person 1: “Async only!” Person 2: “Slack bots!” Person 3: “More, but better meetings” [Person 3 gets tossed out the window]](https://pbs.twimg.com/media/E-XvsQ8VcAMipif.jpg?name=small&format=webp)


