adam-26 / react-script-tag

A react <script> tag that supports universal rendering
MIT License
19 stars 6 forks source link

TypeError: Cannot read property 'removeChild' of null #16

Closed chenkie closed 5 years ago

chenkie commented 5 years ago

Thanks for this project!

I'm seeing this error when I navigate away from a page that makes use of ScriptTag:

TypeError: Cannot read property 'removeChild' of null

Looks like it's coming from the removeNode method here.

Pretty new to React so I may be doing something wrong.

Thanks!

adam-26 commented 5 years ago

Either you're doing something wrong, or your using new version of React that is causing problems (the React API is constantly evolving). The tests are passing, but not using the latest version of React.

Without your code to look at I can't be of any more help. You can open a new issue if you want to post some code, be sure to explain if the error is happening on the client or server.

Alternatively, fork this repo then update the React version and run the tests to see if its a React version problem.