
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
react-telegram-webapp
Advanced tools
This library can be used to create React UIs in use with the new Telegram WebApp feature. This library use context to feed all your components with the current state of the Telegram props.
This library can be used to create React UIs in use with the new Telegram WebApp feature. This library use context to feed all your components with the current state of the Telegram props.
Wrap your components with a TelegramWebApp component.
It receives a validateHash function, which will be called to validate the hash received from Telegram.
import React from 'react';
import ReactDOM from 'react-dom';
import { TelegramWebApp } from 'react-telegram-webapp';
async function validateHash(hash) {
const response = await fetch(`/api/validate`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ hash }),
});
return response.ok;
}
ReactDOM.render(
<TelegramWebApp validateHash={validateHash}>
<MyComponent />
</TelegramWebApp>,
document.getElementById('root')
);
You can also wrap your components with a withTelegramWebApp function.
It also receives a validateHash function, which will be called to validate the hash received from Telegram.
import React from 'react';
import { withTelegramWebApp } from 'react-telegram-webapp';
function App() {
return <MyComponent />;
}
async function validateHash(hash) {
const response = await fetch(`/api/validate`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ hash }),
});
return response.ok;
}
export default withTelegramWebApp(App, {
validateHash
});
useStartParam - return the start params
useTelegramWebApp - return the TelegramWebApp object
useIsTelegramWebAppReady - returns true if the TelegramWebApp is ready. You can use this to show loading screen
If you want to contribute to this library, please open an issue or pull request.
FAQs
This library can be used to create React UIs in use with the new Telegram WebApp feature. This library use context to feed all your components with the current state of the Telegram props.
The npm package react-telegram-webapp receives a total of 38 weekly downloads. As such, react-telegram-webapp popularity was classified as not popular.
We found that react-telegram-webapp 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.