👌 React PIXI
Edit page
About
Components
HOC
HooksStageTypeScript

Hooks

React Pixi now support React hooks 🌟

useApp

Access the PIXI.Application in your component

import { useApp } from '@inlet/react-pixi'
function MyComponent () {
const app = useApp()
// app => PIXI.Application
return (
...
)
}

useTick

Bind listener to the PIXI.Application ticker event

import { useTick } from '@inlet/react-pixi'
function MyComponent () {
useTick(delta => {
// do something here
})
return (
...
)
}

Example: