
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
babel-plugin-import-react
Advanced tools
> A small babel plugin to automatically import React and it's hooks on your components
A small babel plugin to automatically import React and it's hooks on your components
# yarn
yarn add --dev babel-plugin-import-react
# npm
npm i --save-dev babel-plugin-import-react
Include it on your .babelrc
{
"plugins": ["import-react"]
}
Now you can write all your components this way (without importing React and it's hooks)
// index.jsx
import { render } from 'react-dom'
import App from './App.jsx'
render(<App />, document.getElementById('app'))
// App.jsx
const App = () => {
// No need to import the `useState` hook
const [msg] = useState('Hello World from App!')
return <h1>{msg}</h1>
}
export default App
FAQs
> A small babel plugin to automatically import React and it's hooks on your components
We found that babel-plugin-import-react 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.