Sunday, 23 June 2019

Sync React App with Firebase Real-time Database


---- fbConfig.js import * as firebase from 'firebase'; var config = {     apiKey: '',     authDomain: '',     databaseURL: '',     projectId: '',     storageBucket: '',     messagingSenderId: '',     appId: '' }; firebase.initializeApp(config); export default firebase; ---- App.js import firebase from './fbCOnfig'; state = {     speed: 0 }; componentDidMount () {     const rootRef = firebase.database().ref().child('react');     const speedRef = rootRef.child('speed');     speedRef.on('value', (snap) => {         this.setState({ speed: snap.val() });     }); }

No comments:

Setup Windows Local Account without the Internet

During the Windows setup,  On the WiFi screen, press SHIFT + F10  or  FN + SHIFT + F10  This will open the command prompt window with admini...