ngx-react-connector 2.0.0
Install from the command line:
Learn more about npm packages
$ npm install @imaginelearning/ngx-react-connector@2.0.0
Install via package.json:
"@imaginelearning/ngx-react-connector": "2.0.0"
About this version
This library was generated for Angular 9+ apps.
This library is a connector that allows React components to be used in Angular applications easily.
Install ngx-react-connector
from npm
:
npm install ngx-react-connector
or
yarn add ngx-react-connector
Add needed package to NgModule imports:
import { ReactConnectorModule } from 'ngx-react-connector';
@NgModule({
...
imports: [ReactConnectorModule,...]
...
})
Use the directive in your template
<ng-container
[reactConnectorComponent]="reactComponent"
[reactProps]="reactProps"
[reactEvents]="reactEvents"
[reactClassContainer]="reactClassContainer">
</ng-container>
You can see this variables in the Stackblitz example.
This module contains a service to easily update the properties. You can use like this:
import { ReactConnectorService } from 'ngx-react-connector';
export class AppComponent {
...
reactProps = {text: 'Sample button'};
constructor(private _rcService: ReactConnectorService) {}
updateText(text: string) {
this.reactProps = this._rcService.updateProps(this.reactProps, {text});
}
...
}
Details
- ngx-react-connector
- ImagineLearning
- about 1 year ago
- MIT
- 6 dependencies
Assets
- ngx-react-connector-2.0.0.tgz
Download activity
- Total downloads 8
- Last 30 days 0
- Last week 0
- Today 0