Konamimojisplosion

Hooks konami-code-js to trigger emojisplosion.

If a user types in the Konami Code on their keyboard or taps it on their mobile phone, emojisplosions will start firing on the page. Triggering the Konami Code again will stop the emojisplosions.

Usage

You can import and use this as a standalone function, a React hook, or a React class component.

Standalone Function

import { initializeKonamimojisplosion } from 'konamimojisplosion';

initializeKonamimojisplosion();

React Hook

import { useKonamimojisplosion } from 'konamimojisplosion';

function MyComponent() {
    useKonamimojisplosion();

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

React Class Component

Tip: the class component just calls the hook internally.

import { Konamimojisplosion } from 'konamimojisplosion';

class MyComponent {
  render() {
    return (
      <main>
        <Konamimojisplosion />
        Hello, world!
      </main>
    );
  }
}

Development

Requires:

After forking the repo from GitHub:

git clone https://github.com/<your-name-here>/konamimojisplosion
cd konamimojisplosion
yarn

GitHub

https://github.com/Codecademy/Konamimojisplosion