Comments (6)
A potential solution is to use:
const uid = snapshot.docs[0].ref.path.split('/')[1];
and put that line^ and the rest of the code in that function in a try catch block. The line above will throw an error if there is no documents (posts), so for users where this throws an error, just catch, and do nothing since its pointless to get the posts of a user with no posts.
from instagramclone.
const uid = snapshot..query.C.path.segments[1];
For me the path was different from the one in the tutorial, so try this it might help
from instagramclone.
I think you should console.log(snapshot) for yourself and try to find the segments data based on the console.log, the snapshot data might be different because firebase might update their way to display the snapshot. For my part i was able to retrieve the data from snapshot..query.C.path.segments[1];
from instagramclone.
I'm facing the same issue when fetching userlikes (((snapshot.ZE.path.segments[3];))))), any solutions???
from instagramclone.
A potential solution is to use:
const uid = snapshot.docs[0].ref.path.split('/')[1];
and put that line^ and the rest of the code in that function in a try catch block. The line above will throw an error if there is no documents (posts), so for users where this throws an error, just catch, and do nothing since its pointless to get the posts of a user with no posts.
This worked for me when fetching user posts, any solution for user likes instead of snapshot.ZE.path.segments[3] ???
from instagramclone.
What does _C_
mean?
(I tried googling before posting).
from instagramclone.
Related Issues (20)
- Unable to start your application. Please refer to https://expo.fyi/no-registered-application for more information. at node_modules/react-native/Libraries/ReactNative/AppRegistry.js:200:6 in runApplication
- I can't seem to load comments with username attached
- snapshot.ZE.path.segments is undefined HOT 1
- updateUserFeedPosts is not defined in Redux actions HOT 1
- ReferenceError: Can't find variable: initialState
- Setup-your-project - need exact versions to install to avoid errors HOT 3
- 903433436
- When following the wiki to deploy section e In the indexes tab create the following index: is left blank.
- Has anyone succeeded adding drawer navigation to profile screen?
- Section (e) of wiki "In the indexes tab create the following index: " is left blank.
- Bl
- npm install expo - can't start project? HOT 2
- https://github.com/SimCoderYoutube/InstagramClone.wiki.git
- The error you're experiencing is a dependency resolution problem in npm
- Instagram hack HOT 1
- Clone instagram
- const found = getState().usersState.users.some(el => el.uid === uid) HOT 1
- Inka
- Issue when fetching Feed from following
- Issue getting uid using getState from redux
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instagramclone.