Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bubblydoo/angular-react

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bubblydoo/angular-react - npm Package Compare versions

Comparing version 0.0.19 to 0.1.0

.browserslistrc

26

package.json
{
"name": "@bubblydoo/angular-react",
"version": "0.0.19",
"version": "0.1.0",
"license": "MIT",

@@ -17,23 +17,3 @@ "author": "Hans Otto Wirtz <hansottowirtz@gmail.com>",

"tslib": "^2.3.0"
},
"module": "fesm2015/bubblydoo-angular-react.mjs",
"es2020": "fesm2020/bubblydoo-angular-react.mjs",
"esm2020": "esm2020/bubblydoo-angular-react.mjs",
"fesm2020": "fesm2020/bubblydoo-angular-react.mjs",
"fesm2015": "fesm2015/bubblydoo-angular-react.mjs",
"typings": "bubblydoo-angular-react.d.ts",
"exports": {
"./package.json": {
"default": "./package.json"
},
".": {
"types": "./bubblydoo-angular-react.d.ts",
"esm2020": "./esm2020/bubblydoo-angular-react.mjs",
"es2020": "./fesm2020/bubblydoo-angular-react.mjs",
"es2015": "./fesm2015/bubblydoo-angular-react.mjs",
"node": "./fesm2015/bubblydoo-angular-react.mjs",
"default": "./fesm2020/bubblydoo-angular-react.mjs"
}
},
"sideEffects": false
}
}
}

@@ -124,2 +124,37 @@ # React in Angular and Angular in React

### Refs
You can get a ref to the Angular component instance as follows:
```tsx
import { ComponentRef } from '@angular/core';
const ref = useRef<ComponentRef<any>>();
<AngularWrapper ref={ref} />;
```
To get a reference to the Angular component's HTML element, use `ref.location.nativeElement`.
To forward a ref to a React component, you can simply use the props:
```tsx
const Message = forwardRef((props, ref) => {
return <div ref={ref}>{props.message}</div>;
});
@Component({
template: `<react-wrapper [component]="Message" [props]="{ ref, message }">`
})
export class MessageComponent {
Message = Message;
message = 'hi!';
ref(div: HTMLElement) {
div.innerHTML = 'hi from the callback ref!';
}
}
```
## Developing

@@ -126,0 +161,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc