How to recursively remove delete methods from the document’s object you just updated and have in memory.

Image for post
Image for post
Photo by The Creative Exchange on Unsplash

This morning I had to improve a function we used in DeckDeckGo to recursively clean objects after persistence. Because I am currently quite busy but would not like to push my blogging habits too much on the side, I got the idea that this small “hack” would be a nice subject for a new blog post 🤗.

Introduction

When you use Cloud Firestore, in order to delete specific fields from a document, you have to use the FieldValue.delete() method when you update a document (as displayed in the documentation).

For example, your database contains a document such as the following:

{
description: 'Hello World'…

Image for post
Image for post

Implementing a state management in modern web Angular applications can be tricky.

There are many libraries, such Ngrx, ngxs, Akita, which can be integrated to manage stores but, these are strongly opinionated and have impact on the architecture of the solution.

If we omit the concept displayed by Jonas Bandi in his interesting article, a common alternative to not using 3rd party libraries, is the development of custom stores with RxJS.

In both cases, libraries or custom, RxJS is used 🤷‍♂️.

Even though RxJS is a wonderful piece of technology, is nowadays a de facto standard when it comes to Angular development, and installed per default with almost any starter kits, it can be still opted-out. …


Use Git commands with the GitHub GraphQL API to create a pull request in Firebase Cloud Functions

Image for post
Image for post
Background photo by Lukas Blazek on Unsplash

We recently released an exciting new feature at DeckDeckGo.

In addition to being able to deploy your presentations online as progressive web apps, our web open-source editor can now push your source code to GitHub, too.

This new function runs on Cloud Functions for Firebase. Because we like to share our discoveries, here are the key things we learned while developing this integration.

Access Tokens

To interact with GitHub, we need a token.

Personal token

If you’re looking to interact with GitHub with your account, you can use a personal access token. …

About

David Dal Busco

Freelancer by day | Creator of DeckDeckGo by night | Organizer of the Ionic Zürich Meetup

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store