1.2.0 • Published 9 months ago

next-twa v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Telegram WebApp and NextJS

Getting started

Installation

npm i next-twa --save

Usage

Import NextTWAProvider from the library

import { NextTWAProvider } from 'next-twa';

Then wrap your code in NextTWAProvider component to make it available to all components. next-twa will take care of the back button

<NextTWAProvider>
  <App />
</NextTWAProvider>

Now you can call useNextTWA in any component.

import { useNextTWA } from 'next-twa';

export const MyComponent = () => {
  const { app } = useNextTWA();

  return <p>Hi, {app?.initDataUnsafe.user?.username}</p>;
};
1.2.0

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.2.1-0

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.1.2

9 months ago

1.1.3-0

9 months ago

1.0.5

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0-1

9 months ago

1.0.0

9 months ago