
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
ripple-react-wrapper
Advanced tools
A lightweight wrapper component that enables seamless integration of React components within the Ripple framework.
The Ripple React Wrapper allows you to embed existing React components into Ripple applications, providing a bridge between the two frameworks. This is particularly useful when migrating from React to Ripple or when you want to reuse existing React components in a Ripple project.
npm install ripple-react-wrapper
# or
pnpm add ripple-react-wrapper
# or
yarn add ripple-react-wrapper
import { ReactWrapper } from 'ripple-react-wrapper';
import MyReactComponent from './MyReactComponent';
export component MyRippleComponent() {
<ReactWrapper
component={MyReactComponent}
$props={{ title: "Hello from Ripple!" }}
class="my-wrapper"
/>
}
Important: React components used with this wrapper must include the following import at the top:
import * as React from 'react';
Example React component:
import * as React from 'react'; // Required!
import { useState } from 'react';
interface MyComponentProps {
title?: string;
initialCount?: number;
}
export default function MyComponent({ title = "Counter", initialCount = 0 }: MyComponentProps) {
const [count, setCount] = useState(initialCount);
return (
<div>
<h2>{title}</h2>
<p>Count: {count}</p>
<button onClick={() => setCount(count + 1)}>
Increment
</button>
</div>
);
}
import { ReactWrapper } from 'ripple-react-wrapper';
import ComplexComponent from './ComplexComponent';
export component AdvancedExample() {
let componentProps = {
data: [1, 2, 3, 4, 5],
onItemClick: (item) => console.log('Clicked:', item),
theme: 'dark'
};
<ReactWrapper
component={ComplexComponent}
$props={componentProps}
style="border: 1px solid #ccc; padding: 16px;"
data-testid="react-wrapper"
/>
}
| Prop | Type | Required | Description |
|---|---|---|---|
component | ComponentType<any> | ✅ | The React component to render |
$props | Record<string, any> | ❌ | Props to pass to the React component |
...otherProps | any | ❌ | Additional HTML attributes for the wrapper div |
interface ReactWrapperProps {
component: ComponentType<any>;
$props?: Record<string, any>;
[key: string]: any;
}
type WrappableReactComponent<P = {}> = ComponentType<P>;
type ComponentProps<T> = T extends ComponentType<infer P> ? P : never;
The wrapper creates a div element and uses React's createRoot API to mount your React component inside it. The component is properly unmounted when the Ripple component is destroyed, ensuring no memory leaks.
$props attributeimport * as React from 'react'; at the top.ripple files (this is expected and being worked on)# Format code
npm run format
# Check formatting
npm run format:check
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
Basic ripple react component wrapper
We found that ripple-react-wrapper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.