Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
204 views
in Technique[技术] by (71.8m points)

reactjs - Adding firebase to react.js web application

Hi I just want to be sure that adding firebase script and initializing it in the head tag in the index.html is enough in React?

Like I said I have put below code in scrpit tag

firebase.initializeApp(somefirebaseConfig);
firebase.analytics();

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

According to this article, the author mentioned that to add the config also there. you can initialize the firebase in the head tag like the below image

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...