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

@ngeenx/ngx-react

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngeenx/ngx-react - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "@ngeenx/ngx-react",
"version": "1.0.0",
"version": "1.0.1",
"description": "Embed React components in Angular projects",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,3 +5,7 @@ # ngx-react

> [!WARNING]
> This package is experimental. There may be possible performance problems, memory leaks and similar problems. It is your responsibility to use it.
## [Play on StackBlitz ⚡️](https://stackblitz.com/~/github.com/ngeenx/ngx-react)
## 📦 Installation

@@ -23,2 +27,5 @@

> [!NOTE]
> Addionaly, you can install `@types/react` and `@types/react-dom` for TypeScript support.
## 🚀 Usage

@@ -41,4 +48,17 @@

### 2. Create React Component
### 2. Update `tsconfig.json`
Add the following to your `tsconfig.json` file to allow importing `.tsx` files in Angular Project.
```json
{
"compilerOptions": {
"jsx": "react",
...
}
}
```
### 3. Create React Component
Create a wrapper component for your React component. We will use this component to pass props to the React component.

@@ -51,4 +71,4 @@

const ReactApp: FC<any> = () => {
const [inputValue, setInputValue] = useState('');
const ReactApp: FC<any> = ({ initialInputValue }: any) => {
const [inputValue, setInputValue] = useState(initialInputValue);

@@ -78,3 +98,3 @@ const handleChange = (event: any) => {

### Basic Usage
### 4. Import in Angular Component

@@ -98,4 +118,6 @@ ```typescript

public ReactApp: typeof ReactApp = ReactApp;
public props: any = {}
public props = {
initialInputValue: "Some Value"
}
}
```
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