You typically wouldn't have a <script> element inside a JS file.
As mentioned in the comments, it would probably be best if you started with a tutorial to gain a base understanding of React.
I'll try to cover the errors you've mentioned anyway.
Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?'
JSX is essentially a way of writing elements and components in an HTML-like syntax, within JS. (More here: https://reactjs.org/docs/introducing-jsx.html)
JSX must have one root element. In your screenshot, you have three <script> nodes all at the same level.
You would normally fix this by nesting all the elements within another element (e.g. a <div> or <React.Fragment>). That won't work in this case cause the first two <script> tags shouldn't be in this file anyway.
any '}' expected.ts(1005)
This is happening because you're using a <script> tag in a JS file.
Move the tags that are just importing external scripts to your HTML file.
Remove the <script> tag from the initialisation code so your JS file looks like this.
import firebase from 'firebase';
const firebaseConfig = {
// Your config here
}
// Your function calls here
<script>tag should be used in an html file not a JS... Since this is your first time working with React and Firebase, I'd recommend starting with a guide (not necessarily a Tetris game) but something simple enough to get the hang of the new technologies. When you're comfortable and know your way around then you can attempt your Tetris game... You can try this tutorial for React+Redux+Firebase blog.bitsrc.io/…