问题
BACKGROUND:
Hello, i am newbie to react and currently building an application which has datatables .
PROBLEM:
It runs on the local machine(pc) perfectly but when i use the same code in codesandbox then i get TypeError: this.$el.DataTable is not a function. I have tried using datatable & jquery cdns inside the index.html file but it doesn't have any effect. Any hint ,suggestion would be helpful, thanks in advance.
CODE:
https://codesandbox.io/embed/jjwx6n2r93
回答1:
There were two issues in your code. I have commented them in the fork.
https://codesandbox.io/s/8n1my7rxrj?fontsize=14
来源:https://stackoverflow.com/questions/55468698/typeerror-this-el-datatable-is-not-a-function-react-js