score:2
Your JS code looks like you're trying to use Realtime Database query methods on Firestore. I'd expect it to look more like:
export const getSprintByProjectId = (key) => async (dispatch) => {
console.log(key);
try {
dispatch(loaderOn());
const result = await db
.collection("sprints")
.where("projectId", "==", key)
.get();
console.log(result.docs.map(d => d.data());
} catch (error) {
dispatch(errorOn());
} finally {
dispatch(loaderOff());
}
};
Source: stackoverflow.com
Related Query
- How to filter data at firestore (firebase) and get the filtered data? How to use "equal to" with db collection?
- How to put a dynamic data from firestore in the function where() and also use the snap.size to count the total query to be passed in a graph?
- How do I pass the text data from firestore inside the expandable row and get the document ID to be passed inside the setState?
- How do i filter out category and header and get the index of array of filtered tabs?
- How to configure correctly Firebase and get data in Firestore
- React js backend how to get the price_data info from stripe.checkout.session.line_items and push the data into firestore
- how to order firebase firestore data by the field's value i.e. "reason" field name and its values may be "spam", "nudity" etc
- In Firebase when using push() How do I get the unique ID and store in my database
- How to use firebase auth and Cloud Firestore from different components as a single firebase App
- Get filtered data in component table after executing the filter function on dataSource in ant design
- How to retrieve data from the server using fetch get method and show it in a table
- Firestore - How can I add the Document ID and their data in my state?
- How do I get document and nested collection in a document in a Cloud Firestore collection using Version 9 of the Modular Web SDK?
- How to filter data and show it on top of the array?
- How to send data from react and use the request body in express, using Axios?
- How get data from the state and edit the element in the form?
- How do you select a single cell with react-data-grids and use the data in that cell elsewhere
- How can i use useParams() with an onClick button to navigate to different pages and display the data in react.js?
- How to get data from cloud firestore then filter it, map it then return it?
- How do I filter a list of data by id for my react component to get the name of the object
- How can I get selected data list and structure the data list
- how to save the data from firebase I recently Created with axios and react?
- How to use a data from the 1st API call and use that in my 2nd API call?
- How to get and show all the data recovered?
- Can't get the data from array react and Firestore
- How can I get the value of an input field and use it in URL in React
- How to get the value from interface and use it on another function
- How necessary is it to use Redux in React and store data locally if you're using Firebase and its active listeners?
- How to get a single data element from the database with Redux and React?
- How can I use React context to get the router exactly and only where I need it?
More Query from same tag
- Material UI makeStyles override class properties in it when it is under other class
- How to make my redux action will permanently save even I refresh my browser?
- React - JSX syntax issue, and how to iterate with map and display items on newlines
- React Checkbox Stays Checked Even After Component is Unmounted
- Render "outlined" input when using react-text-mask with Material-UI inputs
- Serialize dynamic form into array of objects
- Axios params returns data inside an object instead of array
- Upload a image with fetch
- Uncaught TypeError: Cannot read properties of undefined (reading 'source') in CartItem
- How can I show(read only) xslx, pdf files in react/javascript using (.xslx or .pdf) urls?
- Maintaining same state variable to implement Show More/Less functionality
- How to add a custom label title to <svg> content generated with Javascript?
- React.js State not updating in Event Listener in useEffect Hook
- Why isn't React Native Drawer being triggered using React Native Router Flux + Redux?
- How to render a React component that relies on API data?
- How to get distinct value using lodash in ReactJS?
- Is running reactstrap dropdown in react jsx
- ReactJS - TypeError: Cannot read property 'name' of undefined
- React redirect causes error: Maximum update depth exceeded
- Error: Objects are not valid as a React child If you meant to render a collection of children, use an array instead
- nock for axios mockup on 400 does not return the defined value
- reactjs chain filtering an array
- Typescript module path resolution not working for .js files
- Transforming 2d array to multipline object
- Create a yellow circle on mousemove with react
- Can I access state inside a createAsyncThunk w/axios with redux toolkit?
- Update same variable from two different components
- Is there a way to use gatsby-awesome-pagination with dynamically filtered data?
- Material UI Tooltip Stays Open after triggered Dialog is closed
- Using Apollo GraphQL refetch method from outside