Important Notes
Key considerations when using FireSnippets.
Key Considerations
-
Firebase Initialization: FireSnippets internally initializes a Firebase app using the configuration provided in your snippets. Ensure that you have the correct Firebase configurations set up in your FireSnippets dashboard.
-
Element IDs: Make sure that all element IDs used in your snippet configurations match the IDs of elements in your HTML.
-
Variables: Variables are used to replace placeholders in paths, queries, and templates. Provide all necessary variables when calling methods.
-
Error Handling: Always include
.catch()
when using Promises to handle potential errors. -
Real-Time Updates:
- Enabling/Disabling: Real-time updates are controlled by the
realTimeUpdatesOn
property in your snippet configuration. - Unsubscribe: Use the
unsubscribe
method provided in the resolved object to stop listening to real-time updates when needed.
- Enabling/Disabling: Real-time updates are controlled by the
-
Asynchronous Operations: All methods are asynchronous and return Promises. Use
async/await
or.then()
/.catch()
to handle them appropriately. -
Security Rules: Ensure that your Firebase security rules allow the operations you're performing, especially for read and write access.