![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
electron-as-browser2
Advanced tools
A node module to help build browser like windows in electron.
npm i electron-as-browser2
const BrowserLikeWindow = require('electron-as-browser2');
let browser;
browser = new BrowserLikeWindow({
controlPanel: 'renderer/you-control-interface.html',
startPage: 'https://page-to-load-once-open',
blankTitle: 'New tab',
debug: true // will open controlPanel's devtools
});
// Trigger on new tab created
browser.on('new-tab', ({ webContents }) => {
// Customize webContents if your like
});
browser.on('closed', () => {
// Make it garbage collected
browser = null;
});
To make the control interface works, there are two steps:
For react users, there is a custom hook useConnect
to help you setup ipc channels.
const useConnect = require('electron-as-browser2/useConnect');
const ControlPanel = () => {
const { tabs, tabIDs, activeID } = useConnect();
return (
<div>Use tabs' information to render your control panel</div>
);
}
For non-react users, you have to setup ipc channels yourself, there are three steps:
ipcRenderer.send('control-ready')
on dom readyipcRenderer.on('tabs-update', (e, tabs) => { // tabs updated })
ipcRenderer.on('active-update', (e, activeID) => { // Active tab's id updated })
Don't forget to removeListener
on ipcRenderer
once control panel unmounted.
Once setup ipc channels, you'll get all your control panel needed informations:
tabs
an object contains all the opened tab's informationstabIDs
array of opened tab's idsactiveID
current active tab's idConstruct and style your control interface as your like.
Then you can send actions to control the browser view, the actions can require from electron-as-browser/control
:
import {
sendEnterURL, // sendEnterURL(url) to load url
sendChangeURL, // sendChangeURL(url) on addressbar input change
sendGoBack,
sendGoForward,
sendReload,
sendStop,
sendNewTab, // sendNewTab([url])
sendSwitchTab, // sendSwitchTab(toID)
sendCloseTab // sendCloseTab(id)
} from 'electron-as-browser/control';
See example for a full control interface implementation.
FAQs
Make electron like browser easy and flexible.
The npm package electron-as-browser2 receives a total of 5 weekly downloads. As such, electron-as-browser2 popularity was classified as not popular.
We found that electron-as-browser2 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.