L
L
leham12021-08-19 18:45:08
React Native
leham1, 2021-08-19 18:45:08

How can you call a function from another screen in react navite?

Hello. The mobile application has two screens (screen_1 and screen_2). There is data that is stored in screen_1 (in AsyncStorage). To update this data, I need to call the function that is in screen_1. Can you please tell me if I can call a function from screen_2 that is in screen_1, and if so, how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Otricala, 2021-08-19
@leham1

Hello, what prevents you from creating a common context and transferring the function from screen_1 to the context and then getting it from the context to screen_2?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question