Closed abrar0123 closed 2 weeks ago
Define "not able".
What have you tried?
Please provide a minimal app reproducing the issue.
1-in react native widget now displays list static data in widgets 2- i want to display the dynamic list data by api calls , api call is correct and also receive data but issue is that not apply logic of react like usestate , useeffects , here is screenshots i was use in here : and get error here : so i try to get di this with another method and i am able to call api data and get list data but when i am when i want to displays my list nothing will displays on when i add widget
@sAleksovski please look and give me solution
Please read the docs.
https://saleksovski.github.io/react-native-android-widget/docs/tutorial/widget-design
One of the first things there is that you cannot use hooks inside the widget.
Fetch the data outside the widget in the widget-task-handler
and pass it to the widget as a prop.
okey i understane but still one problem i get that it takes so much time to load widget with static or dynamic list mapping due so how manage this . @sAleksovski
I guess the speed depends on the number of items, how much it takes to get the data from server, what kind of device you have...
The list widget from the example app is loading fairly quickly.
I'll close this issue since the last question is not related with the original issue.
i want to displays listing with api data in react native but not be able , how to displays api data listing