How to use firebase database with React
Solution 1:
Firebase does not have a function called syncState. That's why you got this error.
I think you try to use re-base: https://firebaseopensource.com/projects/tylermcginnis/re-base/.
But it has not been updated so I recommend that you use just plain firebase library.
1 Setup: https://firebase.google.com/docs/web/setup
2 RealtimeDatabase Setup: https://firebase.google.com/docs/database/web/start