Skip to content

Document importing TSXΒ #253

@thescientist13

Description

@thescientist13

Summary

Greenwood's Import JSX plugin is getting support for TSX!

export default class Counter extends HTMLElement {
  count: number;

  constructor() {
    super();
    this.count = 0;
  }

  connectedCallback() {
    this.render();
  }

  render() {
    const { count } = this;

    return (
      <div>
        <button onclick={this.count -= 1}> -</button>
        <span>You have clicked <span class="red">{count}</span> times</span>
        <button onclick={this.count += 1}> +</button>
      </div>
    );
  }
}

customElements.define('app-counter', Counter);

Additional Details

Things we'll want to do

  1. Add JSX plugin to the sidebar (very expirmental!)
  2. Add as an entry to home page snippets component
  3. Make sure to capture tsconfig.json settings callout

Greenwood Issue

ProjectEvergreen/greenwood#1605

Metadata

Metadata

Labels

docsGreenwood specific content like docs and guidesrelease/v0.34.0

Type

Projects

Status

πŸ”– Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions