reactjs - require is not defined in react while working with Chatbot -


i'm new in react js, i'm setting chatbot in react.
i'm facing referenceerror: require not defined error

how solve problem.

var chatbot  = require('react-simple-chatbot');  const steps = [   {     id: '0',     message: 'welcome react chatbot!',     trigger: '1',   },   { id: '1', message: 'bye!', end: true,  },  ];  reactdom.render(    <div>     <chatbot steps={steps} />   </div>,    document.getelementbyid('root')  ); 

basically need transform source code browser, replacing require calls actual module code. take @ these utilities:

i recommend second.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -