Skip to content

Instantly share code, notes, and snippets.

View mrackwitz's full-sized avatar

Marius Rackwitz mrackwitz

View GitHub Profile
@mrackwitz
mrackwitz / Debounced.swift
Created October 2, 2020 19:41 — forked from nerdsupremacist/Debounced.swift
Debounced Property Wrapped
import SwiftUI
import Combine
@propertyWrapper
struct Debounced<Value>: DynamicProperty {
private class Box: ObservableObject {
let value = PassthroughSubject<Value, Never>()
@Published
private(set) var debounced: Value