
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
clink-react
Advanced tools
Clink (Chakra link)A Chakra UI v2 Link component that integrates with React Router.
npm install clink-react
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import Clink from 'clink-react'
<BrowserRouter>
<ChakraProvider>
<Clink to='/' color='blue'>Home</Clink>
<Clink to='/test'>Test</Clink>
<Clink to='http://npmjs.com' isExternal>NPM</Clink>
<Routes>
<Route path='/' element={<>Home page</>} />
<Route path='/test' element={<>Test page</>} />
</Routes>
</ChakraProvider>
</BrowserRouter>
Chakra UI's Link component provides styling, but React Router's Link component provides routing functionality.
Effectively combining them in a reusable component requires boilerplate in the form of combining prop types or awkward wrapping, as well as aliasing one or both imports.
Clinkimport { HStack, Link as ChakraLink, LinkProps as ChakraLinkProps } from '@chakra-ui/react'
import { Link as ReactRouterLink, LinkProps as ReactRouterLinkProps } from 'react-router-dom'
function NavbarLink (props: ChakraLinkProps & ReactRouterLinkProps): JSX.Element {
return <ChakraLink as={ReactLink} color='blue' {...props} />
}
function Navbar () {
return (
<HStack>
<NavbarLink to='http://npmjs.com' isExternal>NPM</NavbarLink>
<NavbarLink to='/about'>About</NavbarLink>
</HStack>
)
}
Clink collapses both components into one.
It takes that takes union of their props types as its props.
It can receive any props that either Chakra or React Router's Link can.
The type of the props it can receive is exported as ClinkProps.
Clinkimport { HStack } from '@chakra-ui/react'
import Clink, { ClinkProps } from 'clink-react'
function NavbarLink (props: ClinkProps): JSX.Element {
return <Clink color={blue} {...props} />
}
function Navbar () {
return (
<HStack>
<NavbarLink to='http://npmjs.com' isExternal>NPM</NavbarLink>
<NavbarLink to='/about'>About</NavbarLink>
</HStack>
)
}
FAQs
A Chakra UI v2 Link component that integrates with React Router.
We found that clink-react 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.