//
//  PreferenceKeys.swift
//  lichunWebsocket
//
//  SwiftUI preference keys for passing data up the view hierarchy
//

import SwiftUI

/// Preference key for tracking scroll offset
struct ScrollOffsetPreferenceKey: PreferenceKey {
    static var defaultValue: CGFloat = 0

    static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
        value += nextValue()
    }
}
