Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
announcekit-react
Advanced tools
The easiest way to use AnnounceKit widgets in your React App.
Visit https://announcekit.app to get started with AnnounceKit.
yarn add announcekit-react
import React from "react";
import AnnounceKit from "announcekit-react";
class App extends React.Component {
render() {
return (
<div>
<nav>
<ul>
<li>
<a href="#">Home</a>
</li>
<li>
<AnnounceKit widget="https://announcekit.app/widgets/v2/34MmKA">
<span>Whats new</span>
</AnnounceKit>
</li>
</ul>
</nav>
</div>
);
}
}
widget
- The url of the widget. You can obtain it while creating or editing widget in AnnounceKit Dashboard.widgetStyle
- You can apply CSS rules to modify / tune the position of the widget launcher.floatWidget
- Set true if the widget is a Float widget.embedWidget
- Set true if the widget is a Embed widget.lang
- Language selectoruser
- User properties (for user tracking)data
- Segmentation dataonWidgetOpen
- Called when the widget is opened.onWidgetClose
- Called when the widget is closed.onWidgetResize
- Called when the widget is resized.onWidgetUnread
- Called when unread post count of widget has been updated.You can use ref
property to access the widget instance and call control functions
open()
close()
unread()
instance()
function App() {
const ref = React.createRef<AnnounceKit>();
React.useEffect(() => {
ref.current.unread().then(an => console.log("unread", an));
});
return (
<div>
<button onClick={async() => await ref.current.open()}>
Click to open widget
</button>
<AnnounceKit ref={ref} widget="https://announcekit.app/widgets/v2/3739N6">
<span>Whats new</span>
</AnnounceKit>
</div>
)
}
FAQs
Use AnnounceKit widgets in your React App
The npm package announcekit-react receives a total of 0 weekly downloads. As such, announcekit-react popularity was classified as not popular.
We found that announcekit-react demonstrated a not healthy version release cadence and project activity because the last version was released 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.