
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@fuels/react
Advanced tools
The Fuel Wallet React Hooks provide a set of hooks to seamless integrate the Fuel Wallet browser extension with any React JS or Next JS project.
npm install fuels @fuels/react
Note that the fuels package is also required as a dependency for better integration with other applications built using the Fuels TS SDK.
Adding the providers on the upper level of the application that will use the hooks.
import { FuelProvider } from '@fuels/react';
import { App } from './App';
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<FuelProvider>
<App />
</FuelProvider>
</React.StrictMode>,
);
import { useState } from 'react';
import {
useConnect,
useConnectors,
useDisconnect,
useIsConnected,
} from '@fuels/react';
export default function App() {
const [connector, setConnector] = useState('');
const { connectors } = useConnectors();
const { connect } = useConnect();
const { disconnect } = useDisconnect();
const { isConnected } = useIsConnected();
return (
<div
style={{
display: 'flex',
flexDirection: 'column',
gap: 10,
padding: 10,
maxWidth: 300,
}}
>
<select
onChange={(e) => {
console.log(e.target.value);
setConnector(e.target.value);
}}
>
<option value="">Select a connector</option>
{connectors.map((c) => (
<option key={c.name} value={c.name}>
{c.name}
</option>
))}
</select>
<button disabled={!connector} onClick={() => connect(connector)}>
Connect to {connector}
</button>
<button disabled={!connector} onClick={() => disconnect()}>
Disconnect from {connector}
</button>
<p>{isConnected ? 'Connected' : ''}</p>
</div>
);
}
Please visit our docs to get started using the Fuel Wallet React Hooks.
Additionally, you can check up the Fuel Wallet React Hooks reference for more details.
This repo is licensed under the Apache-2.0
license. See LICENSE
for more information.
FAQs
Interact with the Fuel Wallet Extension in React.
The npm package @fuels/react receives a total of 3,710 weekly downloads. As such, @fuels/react popularity was classified as popular.
We found that @fuels/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.