Skip to content

Instantly share code, notes, and snippets.

View ahonn's full-sized avatar
🐵
Happy Hacking

Yuexun ahonn

🐵
Happy Hacking
View GitHub Profile
@ahonn
ahonn / PagerView.swift
Created December 26, 2019 08:54 — forked from mecid/PagerView.swift
PagerView in SwiftUI
//
// PagerView.swift
//
// Created by Majid Jabrayilov on 12/5/19.
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
struct PagerView<Content: View>: View {
let pageCount: Int
@ahonn
ahonn / reagent-ref-functions.clj
Created September 30, 2017 15:57 — forked from pesterhazy/reagent-ref-functions.clj
Using ref functions with reagent
;; React supports "refs" as a way for a component to get a
;; handle to its children. Classically, refs were string-based.
;; Recent versions of React support callback attributes as a
;; more elegant variant of accessing DOM notes or components.
;;
;; This example uses a Form-3 component as per
;; https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components
;;
;; For callback refs, see React's documentation
;; https://facebook.github.io/react/docs/more-about-refs.html