react-native/ios/Native/Application/RootView.swift

26 lines
475 B
Swift
Raw Permalink Normal View History

2025-08-02 13:00:06 +02:00
//
// RootView.swift
// RNPlayground
//
// Created by Artur Gurgul on 02/08/2025.
//
import SwiftUI
struct RootView: View {
private let sharedState: SharedState
init(_ sharedState: SharedState) {
self.sharedState = sharedState
}
var body: some View {
VStack {
ToolboxHeader()
2025-08-02 13:00:06 +02:00
if let reactNativeFactory = sharedState.reactNativeFactory {
UIReactNativeView(reactNativeFactory)
}
}
.environmentObject(sharedState)
2025-08-02 13:00:06 +02:00
}
}