6
votes
Accepted
Search filter for words in dart
I have tried make a more optimized version here which also will work for string of any sizes and any number of words:
...
5
votes
Accepted
Sending Firebase Cloud Messaging Notifications via FCM HTTP v1 API with PHP
I'm going to do this in steps so you can follow my train of thought:
1. Make it classy
First, I would wrap everything in a class. Functions that belong together go together in a class (unless you have ...
4
votes
Accepted
Parameter guards for Firebase calls
So given this is a blanket rule across all the functions i.e. val === undefined then throw you could introduce a common validator function you could share across ...
4
votes
Accepted
Handling google authentication with firebase in nextjs web app
stop using recompose because it got deprecated and you don't need it if you use react hooks.
transform your components and use react hooks because it's an anti-pattern to use them with class ...
4
votes
NoSQL data model design for players in a game
Okay, I don't think you need 8 root level stats collections. Instead one stats collection and create those 8 as sub collections. Keep in mind that you can't query across the sub collections. (Anyway ...
3
votes
Accepted
Destructuring with map and assigning to a constant
Super short review;
Logging to console seems very primitive, consider a logging solution that handles different logging levels.
...
3
votes
Sending Firebase Cloud Messaging Notifications via FCM HTTP v1 API with PHP
I would be curious about performance gain if reusing an existing curl handle rather than init/close every time. Especially when there is a TLS handshake involved. I have not been doing much PHP for a ...
3
votes
Accepted
Destroy Singleton pattern in kotlin
If you want a thread safe singleton in Kotlin, you should re-write your singleton like so:
...
3
votes
Accepted
Managing Angular subscriptions
I suggest to use the first approach. You than can provide some pipes that could transform the returned values as you need. And if the articles are showed only in your component is better to store them ...
3
votes
Loading items for an eCommerce site
Here are a few things:
good you're using ` (template literals) to format your HTML inside the JavaScript code
don't use ...
3
votes
Controlling Finances with Web Development
Another thing I wanted to touch on is the formatting functions. For example, the deformat() function.
...
2
votes
Accepted
Controlling Finances with Web Development
I know it has been more than two years since you posted this question so I apologize that nobody has supplied an answer yet. I also realize that you likely have learned a few things since then and I ...
2
votes
Maintainable networking layer architecture
I really dislike your FirebaseEndpoint enum. I would rather see something like this:
...
2
votes
Vue + Vuex + Firebase serverless realtime chat
The code looks pretty straight-forward and I don't spot any obvious simplifications. I would suggest that you add error handling - especially for the case when uid ...
2
votes
Parameter guards for Firebase calls
I guess if you just want to validate, you could write something like the following, though i'm not sure if that really answers your question.
...
2
votes
Cloud Function: Deleting from both Firestorage and Firestore in a kind of "batch"
I must admit that I haven't really used firebase or done any android development and thus cannot answer your questions about the correctness of the code. I did wonder if using a transaction would help ...
2
votes
Managing Angular subscriptions
I think at the end it depends on the use case.
For a simple loading of data, i would use the approach of getting the Observable directly.
When the backendcall is not anymore the single source of ...
2
votes
Accepted
How can this swift, firebase image fetching, function be made more concise?
I would start by investigating the cases where you are performing if lets and basic unwrapping. Cases like if snapshot.value as? [String: AnyObject] != nil can be ...
2
votes
Accepted
Update user name within participants of chats
Data to load can likely be reduced
Instead of loading the entire collection of chats one could load only chats with the participants containing the username - ...
2
votes
ZooRater mobile app. This code is responsible for displaying and handling zoo dashboard. Need general advice
Anko commons
I think Anko is dead, however, their library is still pretty useful.
I would recommend commons, such that you can rewrite the activity-starting
...
1
vote
@angular/fire Firestore cached service
Browser localStorage has storage data limit about 5Mb.
Better to use @ngx-pwa/local-storage https://github.com/cyrilletuzi/angular-async-local-storage.
I've just tested it for storing one array of ...
1
vote
Accepted
React Native login, sign up and sign out using Firebase project
Review
Overall the code looks decent. It seems the code is separated into components well, and indentation is consistent. It makes good usage of hooks, and const ...
1
vote
Destructuring with map and assigning to a constant
You asked about destructuring so I am going to review the destructuring bit only.
Your after code looks fine. It's slighlty unconventional to destructure two separate things from a tuple you created. ...
1
vote
Destructuring with map and assigning to a constant
Just one small suggestion regarding the deconstruction: You can deconstruct function parameters, so it could be written as:
...
1
vote
Angular observables piping
What do you mean with "efficient" in this case?
From the performance perspective its slow, because it handles one element after the other and for handling one element it needs to wait for an ...
1
vote
Accepted
Private desktop and mobile WebSocket connections with Node.js
The code you made is looking pretty good. I'm no expert in the particular tools you're using, but I'll still give my two cents about the parts I understand more.
Let's start with your upgrade listener....
1
vote
Accepted
Swift iOS rewrite a function that use Firebase database without updating a global variable
A typical way to write an asynchronous function is to have it take a function as an argument that will be called with the results when they are ready. Such a function is often called a completion ...
1
vote
Accepted
Updating text with JavaScript and Firebase
1. Leaking
Between:
window.setInterval(update, 100);
And:
leadsRef.on('value', function(snapshot) {...}
You are adding a ...
1
vote
Accepted
Swift UITableViewCell class to show cameras, ratings for a car wash and other information
here just my ideas how to improve your code. maybe in some points i am wrong, but this are the places i would dig into and make it a little better:
1) set Image only once
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
firebase × 56javascript × 25
authentication × 9
android × 8
swift × 8
beginner × 7
node.js × 5
angular-2+ × 5
java × 4
html × 4
ecmascript-6 × 4
asynchronous × 4
typescript × 4
angular.js × 4
promise × 4
performance × 3
react.js × 3
database × 3
ios × 3
kotlin × 3
json × 2
error-handling × 2
mvvm × 2
vue.js × 2
cocoa × 2