How to fetch data from firestore using JS

Currently trying to create table form which can be fetch data from firestore database then showing some information in it which help to get real time database

Have you read the docs?

How to get docs cause im new to javascript

Not saying you’re wrong, you know yourself best - but databases in general and firebase in particular isn’t really am intro to javascript concept. I suspect there are mainly two possibilities:

  1. You’ve been working on the basics of javascript, but perhaps lack confidence in your skills and abilities; or
  2. You might have an idea for an app or project, started learning the basics, and might be thinking building something heavy-hitting may level up your skills.

There are other possibilities, but they seem far less likely.

But wherever you are, research and reading are a vital skill to develop. That’s what @kevinSmith was doing, when he gave you the link to the firebase docs, and why I’ll add that a tutorial from freecodecamp: Firebase Cloud Firestore – Database Crash Course

Out of curiosity, how far are you in the freecodecamp curriculum?

im quite new to coding which take me arounf 1 month understanding the html css and some bits of javascript

How to get docs cause im new to javascript

“Docs” are just “documents” or “documentation”. Most every major library/API is going to have documentation. Normally you find them by googling. I googled for firestore and found the page that I linked above. That has examples of using firestore with JS.

im quite new to coding which take me arounf 1 month understanding the html css and some bits of javascript

This sounds a little ambitious for someone without much JS experience. Even if you get it running, you’re going to keep getting problems.

Kind of inline with what snowmonkey seems to be suggesting, I might continue developing your JS skills. You at least need a solid understanding of how JS works and be comfortable consuming APIs. You can always take a look at the tutorial that he linked and see how comfortable you are with that.

But I would advise against trying to do projects that are too far beyond your abilities. It can lead to frustration and a lot of janky code and some bad habits. I would suggest shoring up your fundamentals.

1 Like

You captured my point exactly. I have guitar students who think I’ve failed as a teacher when they’re not playing like Santana by the third lesson.

But it is not a failure of either the teacher or the student, it sounds like a long-range goal being confused with a short-range idea.

But there are interim steps. Learning to manipulate HTML from javascript, learning to use localStorage (saving data in the client browser), learning to manipulate JSON or SQLite on the client side, learning to consume an API… These are all lessons that build up to a more complex project like firestore-backed anything.

And all of them take research and practice.

1 Like

Yeah, I used to hate when I would get guitar students that would come in on the first lesson with, “Yeah, I don’t really care about learning guitar, I just want to learn this Green Day song.” I knew that they would never last. You have to love the guitar and want to learn it. Having a specific goal is great, but you also have to be invested in the process of learning and learning all the info you need, not just picking and choosing from a buffet because you think you know what you’ll eventually need.

We’re not trying to come down on you @saf2, just suggesting that you take a long view and invest some time in learning the fundamentals. I get that you might have this goal in mind, and if you want to work on that on the side, that is fine, but you should also be working on the fundamentals. And if your only goal is just this project, then I would suggest finding a coder to do it for you - if you aren’t interested in coding, then this is going to be more trouble than it’s worth.

Again, I’m not trying to discourage you. If you want to learn coding, then you will be a welcome addition to our family and we are here to help.

Thanks guys for the information will trying the link first so i could understand better.