
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.
Reblock is a library for building interactive Slack surfaces with React and Slack Bolt. You can use all of the familiar features of React, like hooks and context, to build Slack modals, messages, and home tabs, without dealing with the complicated, cumbersome JSON or implementing your own interactivity and state management.
import Reblock from 'reblock'
import { useState } from 'react'
function Increment() {
const [count, setCount] = useState(0)
return (
<>
<rich>
Count: <code>{count}</code>
</rich>
<button onEvent={() => setCount(count + 1)}>Increment</button>
</>
)
}
Reblock.appHome(app, (userID) => (
<>
<rich>
Hello <user>{userID}</user>!
</rich>
<Increment />
</>
))
First, install Reblock from NPM.
$ bun i reblock
$ npm i reblock
$ yarn add reblock
Then, import the library. You can use the default export or import individual functions and types.
/** @jsxImportSource reblock */
import Reblock from 'reblock'
import { appHome } from 'reblock'
The comment is needed for the correct JSX types to load, but it isn't needed for the code to run. You can also add jsxImportSource to your tsconfig.json.
{
"compilerOptions": {
// other options...
// if using bun, see https://bun.sh/docs/typescript#suggested-compileroptions
"jsx": "react-jsx",
"jsxImportSource": "reblock"
}
}
Coming soon, hopefully! The functions are typed, and all the elements are typed, but TypeScript doesn't allow you to restrict what elements can go in what other elements. For now, message me for help!
Contributions and bug reports are welcome! If you are in the Hack Club Slack, you can also DM me (@Jeremy) with any feedback or questions. If you make something cool with Reblock, please let me know!
main.ts: Main library code, exports all functionshelpers.ts: Helper functions used across the libraryevents.ts: Sets up event listeners for Slack eventsrenderer.ts: Takes React components and, with react-reconciler, converts it to a JSX object treejsx/: Contains all the functions for converting the JSX object tree to Slack Block Kit JSON
blocks.ts: Converts JSX objects to blocksrichText.ts: Converts JSX objects to rich textelements.ts: Converts JSX objects to elementssurfaces/: Contains the Root classes which connect React to different Slack surfaces
home.ts: Renders to the App Homemessage.ts: Renders to a messagemodal.ts: Renders to a modalblocks.ts: Renders to Block Kit JSON (non-interactive)jsx-runtime/: Re-exports React's JSX runtime with Reblock types
jsx-types.ts: Types for the JSX namespacejsx-runtime.ts: Re-exports react/jsx-runtime with Reblock typesjsx-dev-runtime.ts: Re-exports react/jsx-dev-runtime with Reblock typesFAQs
Build interactive Slack surfaces with React
The npm package reblock receives a total of 2 weekly downloads. As such, reblock popularity was classified as not popular.
We found that reblock demonstrated a not healthy version release cadence and project activity because the last version was released 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.

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.