![react script unpkg react script unpkg](https://media.proglib.io/wp-uploads/2018/05/dom-global-variables.png)
![react script unpkg react script unpkg](https://i.stack.imgur.com/GCopY.png)
#React script unpkg install
The problem is that the script tag is not able to locate the referenced script file. You can use a live server to publish the content of your html file. Unzip the downloaded file and open its contents using an IDE of your choice. React Select as a Drop-Down Editor, Survey Creator Example - Survey and Form JavaScript Libraries. Same here i couldnt make it work, weird situation![react script unpkg react script unpkg](https://user-images.githubusercontent.com/10134421/73368384-23790600-42b1-11ea-8069-7235a8c1702a.png)
It is rather troubling especially when I am brand new to react and I am told that the react docs are the best place to learn react and I have flunked on the very first item. Welcome to the discussion about the exercise of Running React Code in the Browser Leave. I don't know enough js/react to know what the above 3 lines does not work but the 2 lines does. The LIKE button does not appear on the html page.īut if I use just the last two lines in the downloaded js file the LIKE button does appear:Ĭonst domContainer = document.querySelector('#like_button_container') ReactDOM.render(e(LikeButton), domContainer) If I use the three lines of code from this page:Ĭonst domContainer = document.querySelector('#like_button_container') const root = ReactDOM.createRoot(domContainer) root.render(e(LikeButton))