How you can retailer dynamically-created user-inputted tags

How you can retailer dynamically-created user-inputted tags


So I’ve an app with a most important web page that has 6 views. A few of them have CRUD performance. I’ve a video view the place the person can add a youtube hyperlink and the video can be uploaded to the view with a thumbnail after which the person can faucet it to go to the video. Similar goes for the Picture tab the place the person can add their very own photos from the gallery and create a slideshow throughout the Picture view.
I mainly take the media and use modals to render them to part tree. So I take the pictures and render them with a and I take the movies and render them with a

The difficulty I’m operating into is that when the person uploads the pictures/movies and goes again to the primary web page after which goes again to the Picture/Video view the pictures are now not there, they don’t save when rerouting.

How can I make it possible for is now not the case?

If it was internet I might hold the newly uploaded media to session storage however I’m not certain how to try this in React Native.

How do I make sure that this occurs?

This is the code for the picture view for context:

export default perform ImagePickerExample() {
  const [images, setImages] = useState([]);
  const [currentIndex, setCurrentIndex] = useState(0); // Observe present picture index


const pickImage = async () => {
    let end result = await ImagePicker.launchImageLibraryAsync({
      mediaTypes: ImagePicker.MediaTypeOptions.Photos,
      allowsEditing: true,
      side: [4, 3],
      high quality: 1,
    });

    if (!end result.canceled) {
      setImages([...images, ...result.assets.map((asset) => asset.uri)]);
    }
  };


return (
<Pressable model={types.iconContainer} onPress={pickImage}>
          <Picture
            supply={require("../property/photos/upload_img.png")}
            model={types.uploadButton}
          />
        </Pressable>

        <View>
          {photos.size > 0 && (
            <FlatList
              horizontal
              information={photos}
              keyExtractor={(imageUri) => imageUri}
              renderItem={({ merchandise, index }) => (
                <Pressable
                  onPress={() => openModal(index)}
                  model={types.container}
                >
                  <Picture supply={{ uri: merchandise }} model={types.picture} />
                </Pressable>
              )}
            />
          )}
        </View>
);

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 
rooshohttps://www.roosho.com
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Latest Articles

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog.