Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@looker/extension-sdk-react
Advanced tools
Add dependency to your project using yarn or npm
yarn add @looker/extension-sdk-react
or
npm install @looker/extension-sdk-react
The Extension SDK for react contains of a provider that allows child components to access the Extension SDK.
Add the ExtensionProvider
near the root of the extension component tree.
<ExtensionProvider onPathnameChange={setPathname}>
<MyComponent/>
</ExtensionProvider>
import React, { useContext } from "react"
import {
ExtensionContext,
ExtensionContextData
} from "@looker/extension-sdk-react"
export const MyComponent: React.FC<{}> = () => {
const extensionContext = useContext<ExtensionContextData>(ExtensionContext)
const extensionHost = extensionContext.extensionSDK
const sdk = extensionContext.coreSDK
The Extension SDK for React supports React Router. Due to security restrictions
of the sandboxed IFRAME only MemoryRouter is supported. The ExtensionProvider creates
the router so you can add Switch
and Route
components as childrem. The Looker host is notified
of changes to the React routes and the child route is appended to he Looker extension
route. This means that the route can be restored on a page reload or sent as a link.
The ExtensionProvider
can also notify the extension of changes to the route using the
onPathnameChange
attribute.
export const MyExtension: React.FC<{}> = () => {
const [pathname, setPathname] = useState("")
return (
<ExtensionProvider onPathnameChange={setPathname}>
<MyLayout>
<MySidebar pathname={pathname} />
<Switch>
<Route path=>
<MyRoute1 />
</Route>
<Route path='/route2'>
<MyRoute2 />
</Route>
</Switch>
</MyLayout>
</ExtensionProvider>
)
}
FAQs
Looker Extension SDK for React
The npm package @looker/extension-sdk-react receives a total of 357 weekly downloads. As such, @looker/extension-sdk-react popularity was classified as not popular.
We found that @looker/extension-sdk-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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.