Skip to content

Instantly share code, notes, and snippets.

@Fanaperana
Fanaperana / advance_component.rs
Last active October 29, 2025 01:09
Example of shared state using GPUI
use gpui::*;
use gpui_component::button::*;
// Shared state using Entity
#[derive(Clone)]
struct CounterState {
value: i32,
}
impl EventEmitter<()> for CounterState {}