question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove NO_ID_FIELD key from data hooks

See original GitHub issue

Remove NO_ID_FIELD key from useFirestoreDocData,useFirestoreCollectionData, useDatabaseListData, useDatabaseObjectData.

This key is inserted when no idField option is passed to these functions. However, it ends up being pretty confusing. Instead, if idField is not provided, we can just omit the document id.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
devthcommented, Mar 8, 2021

Agree, why not default it to _id or something? Alternatively, let users set a global default so we don’t have to keep passing { idField: "id" } on all useFirestoreCollectionData calls.

2reactions
jhuleattcommented, Jan 6, 2021

@SabrinaDanielle it looks like the quickstart code is outdated, apologies for that. I filed #321 to fix the quickstart.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - react-hook-form: How to remove the data values if the ...
I have the following react hook form. I want console.log(data) to print only of the rendered elements. So if somecondition is not true....
Read more >
useForm - unregister - React Hook Form
This method will remove input reference and its value which means build-in validation rules will be removed as well. By unregister an input,...
Read more >
How To Manage State with Hooks on React Components
React Hooks are a broad set of tools in the React front-end JavaScript library that run custom functions when a component's props change....
Read more >
JavaScript Data Grid Events and hooks - Handsontable
The following demo uses beforeKeyDown callback to modify some key bindings: Pressing Delete or Backspace on a cell deletes the cell and shifts ......
Read more >
useKeyPress React Hook - useHooks
useKeyPress. This hook makes it easy to detect when the user is pressing a specific key on their keyboard. The recipe is fairly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found