I'm converting an Android application to React Native and I'm new to this react-native technology.
In my android application, I have used the Singleton object to store some data. I just want to create the same for the react-native application. Inside the Java singleton object, it has a list
eg : public List<PharmacyLocationChecklistsDTO> pharmacyLocationChecklistsDTOS;.
Scenario: In my java application has wizard this singleton object store all the data of that wizard view. I have already implemented the wizard in my react native application, but I don't know how to store data until the user completes the task.
How could I create this object in my react-native app or is there any other way to handle this scenario?
Response,
"pharmacyLocationChecklistsDTOS": [
{
"chelistid": 232,
"ireqstId": 5,
"checklistName": "E",
"validity": "Invalid",
"remark": null
}
]
Sample Java Object,
public class PharmacyLocationChecklistsDTO{
public int chelistid;
public int ireqstId;
public String checklistName;
public String validity;
public Object remark;
}
public class Root{
public List<PharmacyLocationChecklistsDTO> pharmacyLocationChecklistsDTOS;
}