First little project of tchat using Firebase. For fun. No security.
sonsondev / firebender Goto Github PK
View Code? Open in Web Editor NEWa chat using firebase : https://shonhtan.github.io/firebender/
a chat using firebase : https://shonhtan.github.io/firebender/
pour les perf : " Object.keys(connected).length " - vaut mieux mettre ça en computed car à chaque update il va appeler la fonction Object.keys
si vous voulez encore plus creuser firebase, sachez que il peut vous dire aussi qui est connecté grâce à https://firebase.google.com/docs/reference/js/firebase.database.OnDisconnect
Privilégiez les noms de composant en 2 mots ou plus, pour être sûr de pas créer un composant qui peut avoir le même nom qu'une vraie balise
vous avez utilise un ref pour récupérer la value, ça marche mais ce n'est pas bien car ça peut créer une désynchro entre les donnée et l'ui, là il vaut mieux utiliser le v-model https://vuejs.org/v2/guide/forms.html#Basic-Usage vous verrez aussi que v-model à un trim natif :)
Séparer les call vers firebase dans un objet à part avec des methods, comme ça vous centraliser tous les call à un endroit, et c'est cet objet que vous appelez dans vos composant, j'en parle ici :
https://itnext.io/anyway-heres-how-to-do-ajax-api-calls-with-vue-js-e71e57d5cf12
Un vrai UI plutôt qu'un prompt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.