Skip to content

Instantly share code, notes, and snippets.

@aneurysmjs
Last active May 14, 2023 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aneurysmjs/9579916695a1e854beb41de5dcd35072 to your computer and use it in GitHub Desktop.
Save aneurysmjs/9579916695a1e854beb41de5dcd35072 to your computer and use it in GitHub Desktop.
/**
<template>
<div id="foo" @click="handleClick">Yo!</div>
</template>
*/
import {
createElementVNode as _createElementVNode,
openBlock as _openBlock,
createElementBlock as _createElementBlock,
} from "vue"
const _hoisted_1 = ["onClick"]
export function render(_ctx, _cache, $props, $setup, $data, $options) {
// this looks like verbose for the code you can write yourself
// because the compiler always is prioritizing to be more optimized,
// to be more explicit. so you have to actually pass null and all that, this
// is because we want the function calls to have the same amount of arguments so
// it can be more efficient. But in the user exposed `h` function, there's are a lot
// of convenience that provides that we can easier and fluent mirrowing the api
// ourself
return (_openBlock(), _createElementBlock("div", null, [
_createElementVNode("div", {
id: "foo",
onClick: _ctx.handleClick
}, "Yo!", 8 /* PROPS */, _hoisted_1)
]))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment