Closed prateekjadhwani closed 8 years ago
What do you mean by 'ES6' syntax? Some options:
Ah, you've actually specified in it the title - imports/exports.
No: server components doesn't have built-in support for that, so you'll need external support, and Node doesn't do that yet. I think the latest details on Node's plan for this are at https://github.com/nodejs/node-eps/blob/master/002-es6-modules.md, and the tracking issue is https://github.com/nodejs/help/issues/53. Alternatively, you can use Babel for this in the meantime.
If I were you though, I wouldn't worry about it for now - you don't gain much vs CommonJS, and support doesn't really exist for them anywhere yet.
I was wondering if there is a way to create a component in ES6 syntax and import it into another components. Would it be possible for you to modify the attached examples in the
README
file?