Example of calling swift code from RN
This commit is contained in:
parent
1a9884e0e9
commit
151ed6d78b
12 changed files with 86 additions and 6 deletions
18
ios/Native/Application/Views/BaseButton/BaseButton.swift
Normal file
18
ios/Native/Application/Views/BaseButton/BaseButton.swift
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// BaseButton.swift
|
||||
// RNPlayground
|
||||
//
|
||||
// Created by Artur Gurgul on 02/08/2025.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct BaseButton: View {
|
||||
@EnvironmentObject var sharedState: SharedState
|
||||
|
||||
var body: some View {
|
||||
Button("SwiftUI Button") {
|
||||
sharedState.message = "Clicked in SwiftUI button that was created in RN"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue