3

I m so confused with this. In react application we use import keyword to import something... but in express.js we use require keyword? why is that? please explain !

3
  • 1
    Generally because React apps use Babel + Webpack to enable import functionality, and not all Express/server-side apps do the same. There's no reason they can't, though. Commented Jul 13, 2021 at 19:08
  • I'm using express with import just fine. Commented Jul 13, 2021 at 19:30
  • Oh thanks... I was just wondering why is that but now it is making sense. ! thanks :) Commented Jul 14, 2021 at 13:49

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.