I tried your component on React 0.13.1, and the injected script to set the disqus_ variables doesn't run. I'm not sure whether it used to work in older versions; this thread says that setting innerHTML on a <script> element does not cause the scripts to run: https://github.com/facebook/react/issues/654.
In any case, it seems cleaner to me to simply set the variables in componentDidMount.
I tried your component on React 0.13.1, and the injected script to set the
disqus_
variables doesn't run. I'm not sure whether it used to work in older versions; this thread says that settinginnerHTML
on a<script>
element does not cause the scripts to run: https://github.com/facebook/react/issues/654.In any case, it seems cleaner to me to simply set the variables in
componentDidMount
.