dojo / dojo/framework

Dojo Templating

Open
#525 0 comments 0 reactions 0 assignees View on GitHub
area: core enhancement next
Dominant language
TypeScript
Stars
623
Forks
78
PR merge metrics
No merged PRs in 30d

Description

## Enhancement

Defining the view of Dojo widgets has two distinct approaches, using the functional API (`v()`, `w()`) and TSX. These approaches work well, however it would be nice if we could offer a templating syntax for users that are more familiar with writing HTML or for using existing HTML structures within a Dojo Application.

## Proposal

Full reactive templating system for working with Dojo built on the existing VDOM rendering engine and middleware pattern. Supporting conditional logic such as `if`, `loops` and custom API injected via a templating middleware.

Example Template:

```html




Dojo Templating


{ $.widgetProperty }




```

A proof of concept the demonstrates templating that could be possible with Dojo: https://codesandbox.io/s/my-first-blog-0dlvc

## Changes Required

* [ ] Dojo templating syntax design
* [ ] Dojo templating implementation
* [ ] CSS module and theming support
* [ ] Typing support for templates
* [ ] Build support for templates
* [ ] Testing support for templates

Package Version: Dojo 7

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.