
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@twa-dev/backbutton
Advanced tools
DEPRECATED
BackButton
moved to @twa-dev/sdk. This repo and corresponding npm-package are deprecated.
React component for Telegram Web Apps (TWA) Back Button.
npm i @twa-dev/backbutton
TWA SDK contains an interface that controls BackButton. It's written in imperative way:
const BackButton = window.Telegram.WebApp.BackButton;
BackButton.show();
BackButton.onClick(() => window.history.back());
It's not the best way to write code, especially if you use libraries like React.
This package exports React component that wraps TWA BackButton SDK:
import BackButton from '@twa-dev/backbutton';
<BackButton onClick={() => window.history.back()} />
FAQs
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
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.