All of the examples for Lightning Out, such as Use Lightning Components in Visualforce Pages shows that we need an app and a component. Is there a way to use just an app or just a component? Ideally, I'd like to just be able to write an App and not need the extra burden of a component as well.
Documented Example
<apex:page>
<apex:includeLightning />
<div id="lightning" />
<script>
$Lightning.use("c:lcvfTest", function() {
$Lightning.createComponent("ui:button",
{ label : "Press Me!" },
"lightning",
function(cmp) {
// do some stuff
});
});
</script>
</apex:page>
Ideally, I'd prefer if I could just create the app itself in createComponent or something, so that I don't need to have a small three-line application bundle just for the sake of bootstraping a component.
use
function explicitly replaces whatever is in the body of the app with the new content generated increateComponent
.