Render Functions logo

Render Functions

Organization
PatternsDev
render-functions

Teaches Vue render functions and JSX for programmatic template creation. Use when templates are too limiting and you need the full power of JavaScript to construct component output dynamically.

Overview

PublisherPatternsDev
Repositoryskills
Skill namerender-functions
Stars
250
Forks
27
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by PatternsDev on GitHub. Read the source before you install it.

Installation

Install the Render Functions AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PatternsDev/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/vue/render-functions .claude/skills/render-functions
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Render Functions in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Render Functions on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Render Functions is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Render Functions

Table of Contents

Vue recommends for us to use templates (i.e. the <template></template> syntax) to construct the markup of our Vue components. However, we're also given the opportunity to directly use something known as render functions to build the markup of our components as well.

Vue, at build time, takes the templates we create for our components and compiles them to render functions. It's at these compiled render functions, where Vue builds a virtual representation of nodes that make up the virtual DOM.

When to Use

  • Use this when you need complex dynamic rendering logic that's hard to express with template directives
  • This is helpful for component library development where flexibility and low-level control are needed

When NOT to Use

  • When templates handle the use case — templates are more readable and benefit from compile-time optimizations
  • For standard component markup where v-if, v-for, and slots cover the rendering needs
  • When the team is unfamiliar with h() / JSX and the maintenance cost outweighs the flexibility gain

Instructions

  • Use the h() function with three arguments: tag/component, props/attributes, and children
  • Use JSX with @vue/babel-plugin-jsx as a more readable alternative to raw h() calls
  • Prefer Vue templates for most application code — render functions are for advanced cases
  • Remember that Vue JSX uses class (not className) and single curly braces {}

Details

By using render functions, we skip the compile step that Vue takes to compile our templates, and are able to construct our component templates with the help of programmatic JavaScript.

But why?

Render functions come into play when we require a higher level of customization and flexibility that's not easily achievable with the standard template syntax. In a nutshell, you may prefer to use render functions:

  • When you need to dynamically render components or elements based on complex logic that can be cumbersome to express within a template.
  • You want to have a direct hand on the Virtual DOM for advanced manipulations.
  • You want to use JSX for building the template of your components.

Outside of these unique cases, Vue's template syntax should remain the go-to method for constructing component markup.

Render functions

Assume we had the following component that contains a <div> element encompassing a <header> element. The text content of the <header> element simply displays the value of a message prop.

html
<template>
  <div class="render-card">
    <header class="card-header card-header-title">{{ message }}</header>
  </div>
</template>

<script setup>
  const { message } = defineProps(["message"]);
</script>

We'll recreate the markup of the component step by step with the help of the render function — i.e. the h() function.

h is short for hyperscript which is a term often used in virtual DOM implementations to denote JavaScript syntax that produces HTML. In simple terms, the h() function is the render function that allows us to create the "virtual" representation of the DOM nodes that Vue uses to track and subsequently render on the page.

The h() function takes three arguments of its own:

  1. An HTML tag name or a component definition.
  2. The props/attributes to be passed onto the element (event listeners, class attributes, etc.).
  3. Child nodes of the parent node.

Here's the full render function equivalent:

html
<template>
  <render />
</template>

<script setup>
  import { h } from "vue";

  const { message } = defineProps(["message"]);

  const render = () => {
    return h(
      "div",
      {
        class: "render-card",
      },
      [
        h(
          "header",
          {
            class: "card-header card-header-title",
          },
          message
        ),
      ]
    );
  };
</script>

We can now render the above component in the parent App.vue instance and pass a value of "Hello World!" to the message prop.

html
<template>
  <RenderComponent message="Hello world!" />
</template>

<script setup>
  import RenderComponent from "./components/RenderComponent.vue";
</script>

The component constructed with a render function produces the exact same output to its template equivalent.

JSX

JSX is a syntax extension that allows us to write HTML-like code within JavaScript. With Vue, JSX can be used as an alternative to the h() function to construct render functions.

Vue's JSX support isn't built in like in React. We need to use a specific Babel plugin — @vue/babel-plugin-jsx — to have our JSX code transformed into the appropriate h() function calls.

Here's the same render function component we've built before but now recreated with JSX:

jsx
<script setup>
  const { message } = defineProps(["message"]);

  const render = () => {
    return (
      <div class="render-card">
        <header class="card-header card-header-title">{message}</header>
      </div>
    );
  };
</script>

Since JSX is closer to JavaScript than to HTML, Vue JSX components use class instead of className and variables are embedded with single curly braces {} instead of double curly braces {{ }}.

When to use render functions

  • If your component has complex, conditional rendering logic that is hard to express with template directives, render functions (with or without JSX) can provide a cleaner solution.
  • If you want more direct control over the virtual DOM.
  • In library/component-kit development where flexibility and low-level control are needed.

For most typical application development, Vue templates offer the right level of expressiveness and readability. Render functions and JSX are powerful tools to reach for when templates aren't enough.

Source

References

Frequently asked questions

What does the Render Functions AI skill do?

Teaches Vue render functions and JSX for programmatic template creation. Use when templates are too limiting and you need the full power of JavaScript to construct component output dynamically.

Why use Render Functions on TypingMind?

Because you install it once and use it with any model. Render Functions is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Render Functions in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/PatternsDev/skills/tree/main/vue/render-functions. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Render Functions?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Render Functions?

As many as you like. As long as a model supports skills, you can use Render Functions with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Render Functions AI skill free?

Yes. It is published on GitHub by PatternsDev under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇