FEKBD ADDONS · WIDGET #110
Code Snippet Block
Code that looks like it belongs in a real editor — 20 languages, 14 themes, 6 window frames, diff lines, focus lines, notes, typing and terminal animations, copy, download and synced tabs.
20 languages14 themes6 framesdiff + / −focus linesnotes & pinstypingterminal runsynced tabs
JSX / React
import { useState } from 'react';
export default function LikeButton({ initial = 0 }) {
const [likes, setLikes] = useState(initial);
const liked = likes > initial;
return (
<button className={liked ? 'btn is-liked' : 'btn'} onClick={() => setLikes(likes + 1)}>
♥ {likes} likes
</button>
);
}