R
R
Roman2020-01-10 17:10:59
firebase
Roman, 2020-01-10 17:10:59

How to record, store and display unique data for authorized users?

Hello, I am making a movie search application on React + firebase. I made it possible for authorized users to add a movie to bookmarks when clicking on the button, but all users have the same movies in their bookmarks (all users have common movie objects). How to make it possible for different users to get their own unique movie objects from the database and not all common ones? Using the new cloud firestore

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2020-01-11
@Isildur12

you need to store the movies separately and put the id of the movies that the user has bookmarked with a separate key. It will look something like this
UserBookmarks->UserID->Movie
IDs Films->IDs of all movies

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question