프로젝트
GitHub에서 보기
trotyl/ng-vdom
소개
(개발자 프리뷰) Angular용 가상 DOM 확장 기능이며 React 브리지로도 동작합니다.
웹 및 앱 개발What you can do
- Intrinsic elements (DOM element in browser);
- Class component (not fully react compatible);
- Function component;
- Angular component (need to be in entryComponents);
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalNG-VDOM
Virtual DOM extension for Angular, heavily inspired by Inferno.
Installation
Install from NPM or Yarn:
npm install ng-vdom --save
Add to NgModule imports:
import { VDomModule } from 'ng-vdom';
@NgModule({
imports: [
VDomModule
]
})
export class SomeModule {}
Edit tsconfig JSX options:
{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "createElement"
}
}
Usage
Make an Angular Component extends Renderable with a render method:
import { Component } from '@angular/core'
import { createElement, Renderable } from 'ng-vdom'
@Component({
template: ``
})
export class AppComponent extends Renderable {
render() {
return (
<h1>Hello World!</h1>
)
}
}
Embedding Virtual DOM contents inside template
import { Component, NgModule } from '@angular/core'
import { VDomModule } from 'ng-vdom'
@Component({
template: `
<v-outlet [def]="element"></v-outlet>
`
})
export class AppComponent {
element = <h1>Hello World</h1>
}
@NgModule({
imports: [ VDomModule ],
})
export class AppModule { }
What can be rendered?
- Intrinsic elements (DOM element in browser);
- Class component (not fully react compatible);
- Function component;
- Angular component (need to be in
entryComponents);
Roadmap
- Global boostrap without Angular code;
- Fragment render support;
- Array render support;
- React-compatible class component support;
- HTML Attribute support;
관련 프로젝트 살펴보기
불러오는 중…