Sitelet https://github.com/skycodr/ts-react-directives
Skip to content

Latest commit

 

History

90 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ts-react-directives

npm version License: MIT React

About

ts-react-directives is a small React/Typescript library designed to mimic 'Angular' ngIf, ngFor directives. And uses declarative syntax for logic branching and iteration.

Features

  • Check / If / ElseIf / Else — JSX tags for conditional branching.
  • Loop — tags for iterative logic.
  • TypeScript — fully supported.
  • Nestable logic — tags can be nested logically.
  • Validation — dead-lock, crash-detection and ordinal validation.
  • Stable id — automatically add stable key, between render teardown for iterable items.
  • No ternary soup — declarative markup to avoid ternary nesting.
  • Tree-shakeable builds — published as ESM, CJS and UMD with bundled type declarations.
  • Zero runtime dependencies — only react / react-dom as peers.
  • Opt-in error reporting — malformed directives can render a styled, in-place error list while developing, and are silent by default in production.
  • Precompiled styles — ships its own compiled stylesheet.

Getting Started

For features and how-to get started Refer to the developer guide. It demonstrates how to use the the library. If you want to see it an action refer to the demo below.

Click here demo

Documentation

  • Developer guide - features, installation, usage, SSR support, error configuration and styling: DEVELOPER.md
  • Security policy - supported versions and how to report a vulnerability: SECURITY.md
  • License - MIT: LICENSE.md
  • Authors - AUTHORS.md

Todo

  • Add breakOn and continueOn capability
  • Add filters
  • Exhaustive unit tests for loops
  • Refactor unit tests

Issues

Open bug reports and feature requests at GitHub Issues.

About

A runtime declarative, control structure, library for react.

Resources

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages