@konami-emoji-blast/react
TypeScript icon, indicating that this package has built-in type declarations

0.0.0 • Public • Published

@konami-emoji-blast/react

Integration for konami-emoji-blast in React. ⚛️

🤝 Code of Conduct: Kept 📝 License: MIT 📦 npm version 💪 TypeScript: Strict

⬆ ⬆ ⬇ ⬇ ⬅ ➡ ⬅ ➡ 🅱 🅰

Usage

First install the @konami-emoji-blast/react package as a dependency:

npm i @konami-emoji-blast/react

The preferred usage for React is with a provided useKonamiEmojiBlast hook:

import { useKonamiEmojiBlast } from "konami-emoji-blast/react";

export function MyComponent() {
	useKonamiEmojiBlast();

	return <main>Hello, world!</main>;
}

Then, pressing the Konami Code on your React app should trigger fireworks blasts of emoji on the page. Yay! 🎆

If you can't use hooks, a KonamiEmojiBlast component is provided too:

import { KonamiEmojiBlast } from "konami-emoji-blast/react";

export function MyComponent() {
	return (
		<main>
			<KonamiEmojiBlast />
			Hello, world!
		</main>
	);
}

💡 Tip: the class component just calls the hook internally.

Development

@konami-emoji-blast/react is managed as part of the emoji-blast monorepo. See the monorepo's development docs first, then ./.github/DEVELOPMENT.md.

💙 This package was templated with create-typescript-app.

Package Sidebar

Install

npm i @konami-emoji-blast/react

Weekly Downloads

2

Version

0.0.0

License

MIT

Unpacked Size

61.2 kB

Total Files

27

Last publish

Collaborators

  • joshuakgoldberg