Open zoubingwu opened 7 years ago
在引入js和css后,按照文档执行如下代码报错:
gitment.render('comments')
抛出mobx error,targetContainer为null所以找不到它的firstChild,粗略看了下源码发现似乎没有完成js创建容器的步骤。
其实demo页面的代码有,不过大部分人一开始就是从文档看起,所以还是建议文档中添加一句说明,需要在html中加入容器:
<!-- the id in render function --> <div id="comments"></div>
在引入js和css后,按照文档执行如下代码报错:
抛出mobx error,targetContainer为null所以找不到它的firstChild,粗略看了下源码发现似乎没有完成js创建容器的步骤。
其实demo页面的代码有,不过大部分人一开始就是从文档看起,所以还是建议文档中添加一句说明,需要在html中加入容器: