M
M
merss2016-02-10 02:01:17
JavaScript
merss, 2016-02-10 02:01:17

Why doesn't Dispatcher (flux/react) connect?

I connect Dispatcher like this:
npm i flux

var Dispatcher = require('flux').Dispatcher;

module.exports = new Dispatcher();

Gives an error:
Uncaught ReferenceError: require is not defined
What is missing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2016-02-10
@merss

The require function is missing. Connect first where it should come from.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question