Check out example codes for "add navigation bar button swiftui". It will help you in understanding the concepts better.
Code Example 1
.navigationBarItems(
leading: Button(action: {
// Actions
}, label: { Text("Button") }),
trailing: Button(action: {
// Actions
}, label: { Image("Icon") })
)
Learn ReactJs, React Native from akashmittal.com