0.0.6 • Published 3 years ago

@de-pa/react-dom v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@de-pa/react-dom

This package serves as the entry point to the DOM for @de-pa/React. It is intended to be paired with the generic React package, which is shipped as @de-pa/react to npm. based on react-dom and add dependency injection pattern.

Installation

npm install @de-pa/react @de-pa/react-dom injection-js

Usage

In the browser

import { Component, IComponent, InjectionProvider } from '@de-pa/react';
import { render } from '@de-pa/react-dom';

class Service {
    method() {
        return 'hello world';
    }
}

@IComponent()
class App extends Component {
    constructor(public service: Service) {
        super()
    }
    render() {
        return <div>{this.service.method()}</div>
    }
}

render(<InjectionProvider providers={[Service]}><App /></InjectionProvider>,document.body)

API

@de-pa/react-dom

  • findDOMNode
  • render
  • unmountComponentAtNode
0.0.3

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.2-beta1

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.1-beta2

3 years ago

0.0.1-beta1

3 years ago