
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@bento/use-data-attributes
Advanced tools
Introduce the received props as data-attributes on the rendered element
The @bento/use-data-attributes package provides a hook that automatically
converts a component’s props into data- attributes. This allows components to
expose their internal state to the DOM, making debugging and styling components
easier.
npm install --save @bento/use-data-attributes
The useDataAttributes automatically transforms any given object into its
data- attribute equivalent, transforming the values into strings. The resulting
object only contains the data- prefixed attributes.
It's worth noting that this hook does not merge the created data- attributes
with the existing ones. The user is left to decide on the correct merge strategy.
The useDataAttributes hook takes an object with the following arguments:
As the data- attributes end up in the DOM, their values are automatically
transformed into strings. This is done using the @bento/as-value-attribute
package. The package automatically formats the data based on the type of the
value given.
<Source language='tsx' code={ SourceContainer } />
FAQs
Introduce the received props as data-attributes on the rendered element
We found that @bento/use-data-attributes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.