Skip to content

useApp hook

The useApp hook is a custom React hook that returns the application data, including the schema, pages, and other relevant information.

Example usage:

app/pages/example/index.jsx
jsx
import { Page, useApp } from '@kottster/react';

export default () => {
  const { stage } = useApp();

  return (
    <Page>
      App is Running in Stage: {stage}
    </Page>
  );
};

Returned values