
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-iframes-syncher
Advanced tools
react-iframes-syncherIframes are perfect to fully isolate a component from the rest of the page. It would be nice to be able to use them transparently as a normal react component, passing properties and executing callbacks. With this library that will be possible.
You just need to run:
yarn add react-iframes-syncher
First you need to create an isolator of the component that you want to isolate.
To do this you need to import the isolator utility function and pass it the contract of the component you want to isolate.
The contract is an object that contains the address of the isolated react app and its name.
PS: to prevent performance issues, remember to memoized the result.
import {useMemo} from 'react';
import {isolator} from 'react-iframes-syncher';
const RemoteInputContract = {
address: 'https://input.alemoretto.dev',
appName: 'ale-remote-input',
};
export default function App() {
const IsolatedInput = useMemo(() => isolator(RemoteInputContract), []);
const [value, setValue] = useState('');
return (
<>
<IsolatedInput value={value} onChange={setValue} />
<p>
Inside the isolated app you wrote:
<strong>{value}</strong>
</p>
</>
);
}
The isolated app need to use the ComponentSyncher component to communicate with the hosting/parent app.
import {ComponentSyncher} from 'react-iframes-syncher';
export default function InputIsolatedApp() {
return (
<ComponentSyncher appName="ale-remote-input">
{(props: InputProps) => <Input {...props} />}
</ComponentSyncher>
);
}
You can find and example of an isolated app in the demo here.
FAQs
This library allows you to perfectly isolate a part of your react app
The npm package react-iframes-syncher receives a total of 1 weekly downloads. As such, react-iframes-syncher popularity was classified as not popular.
We found that react-iframes-syncher demonstrated a not healthy version release cadence and project activity because the last version was released 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.