Can we See the lwc Module?
This page in the LWC developer guide talks about a component JS file, in particular:
Every UI component must include a JavaScript file with at least this code.
import { LightningElement } from 'lwc';
export default class MyComponent extends LightningElement {
}
The core module in Lightning Web Components is lwc. The import statement imports LightningElement from the lwc module.
import { LightningElement } from 'lwc';
LightningElement is a custom wrapper of the standard HTML element.
Presently I'm learning about JS modules and importing/exporting them. I understand that they are individual JS files.
So is there a way to see the lwc module referenced in the documentation? If possible, what is in it and what does it look like?
javascript lightning-web-components
add a comment |
This page in the LWC developer guide talks about a component JS file, in particular:
Every UI component must include a JavaScript file with at least this code.
import { LightningElement } from 'lwc';
export default class MyComponent extends LightningElement {
}
The core module in Lightning Web Components is lwc. The import statement imports LightningElement from the lwc module.
import { LightningElement } from 'lwc';
LightningElement is a custom wrapper of the standard HTML element.
Presently I'm learning about JS modules and importing/exporting them. I understand that they are individual JS files.
So is there a way to see the lwc module referenced in the documentation? If possible, what is in it and what does it look like?
javascript lightning-web-components
add a comment |
This page in the LWC developer guide talks about a component JS file, in particular:
Every UI component must include a JavaScript file with at least this code.
import { LightningElement } from 'lwc';
export default class MyComponent extends LightningElement {
}
The core module in Lightning Web Components is lwc. The import statement imports LightningElement from the lwc module.
import { LightningElement } from 'lwc';
LightningElement is a custom wrapper of the standard HTML element.
Presently I'm learning about JS modules and importing/exporting them. I understand that they are individual JS files.
So is there a way to see the lwc module referenced in the documentation? If possible, what is in it and what does it look like?
javascript lightning-web-components
This page in the LWC developer guide talks about a component JS file, in particular:
Every UI component must include a JavaScript file with at least this code.
import { LightningElement } from 'lwc';
export default class MyComponent extends LightningElement {
}
The core module in Lightning Web Components is lwc. The import statement imports LightningElement from the lwc module.
import { LightningElement } from 'lwc';
LightningElement is a custom wrapper of the standard HTML element.
Presently I'm learning about JS modules and importing/exporting them. I understand that they are individual JS files.
So is there a way to see the lwc module referenced in the documentation? If possible, what is in it and what does it look like?
javascript lightning-web-components
javascript lightning-web-components
edited 6 hours ago
Adrian Larson♦
108k19115243
108k19115243
asked 7 hours ago
Gabriel RiveraGabriel Rivera
400113
400113
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!
There's not too much going on in the lwc
module. There's basically LightningElement
which exposes an API subset of HTMLElement
(what we consider the "good parts"). There are also the various decorators (api
, track
, readonly
, wire
) and several other APIs that are only usable by our compiler.
To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.
add a comment |
So is there a way to see the lwc module referenced in the documentation?
Not that I know of.
Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "459"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f249887%2fcan-we-see-the-lwc-module%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!
There's not too much going on in the lwc
module. There's basically LightningElement
which exposes an API subset of HTMLElement
(what we consider the "good parts"). There are also the various decorators (api
, track
, readonly
, wire
) and several other APIs that are only usable by our compiler.
To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.
add a comment |
Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!
There's not too much going on in the lwc
module. There's basically LightningElement
which exposes an API subset of HTMLElement
(what we consider the "good parts"). There are also the various decorators (api
, track
, readonly
, wire
) and several other APIs that are only usable by our compiler.
To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.
add a comment |
Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!
There's not too much going on in the lwc
module. There's basically LightningElement
which exposes an API subset of HTMLElement
(what we consider the "good parts"). There are also the various decorators (api
, track
, readonly
, wire
) and several other APIs that are only usable by our compiler.
To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.
Our intent is to open source LWC by the end of the year but it will ultimately come down to resourcing constraints because there's still a lot of work to do!
There's not too much going on in the lwc
module. There's basically LightningElement
which exposes an API subset of HTMLElement
(what we consider the "good parts"). There are also the various decorators (api
, track
, readonly
, wire
) and several other APIs that are only usable by our compiler.
To answer your question though, a single file would be the simplest type of module, but a module can contain multiple files since we are able to import and export in the same file. You can event do that with a single line using module redirects.
answered 6 hours ago
Eugene KashidaEugene Kashida
32125
32125
add a comment |
add a comment |
So is there a way to see the lwc module referenced in the documentation?
Not that I know of.
Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.
add a comment |
So is there a way to see the lwc module referenced in the documentation?
Not that I know of.
Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.
add a comment |
So is there a way to see the lwc module referenced in the documentation?
Not that I know of.
Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.
So is there a way to see the lwc module referenced in the documentation?
Not that I know of.
Unlike Lightning Aura Components, which was built on top of Open Source Aura Framework, Lightning Web Components model at least as of today is not Open Sourced. This is more of a platform implementation for Web Standards and that unless Salesforce opens it up, there's no way of accessing any base code implemented in the LWC model.
answered 7 hours ago
Jayant DasJayant Das
14k2824
14k2824
add a comment |
add a comment |
Thanks for contributing an answer to Salesforce Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f249887%2fcan-we-see-the-lwc-module%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown