• React Bricks 2.3.16
      • Learning resources
      • The CLI
      • Starter projects
      • React Bricks Dashboard
      • React Bricks v2
      • Upgrade v1 > v2
      • Overview
      • The Editor
      • The Playground
      • App Settings
      • Internationalization
      • User roles
      • Pages
      • Click to edit
      • Configuration
      • Page Types
      • Custom fields
      • What is a Brick
      • Schema
      • Side edit props
      • Visual Editing
      • Styling
      • Custom visual editing component
      • Access page meta
      • Overview
      • Repeater items
      • Default items
      • Repeated bricks
      • How to deploy
      • Intro to API docs
      • Components structure
      • <ReactBricks>
      • <PageViewer>
      • <Admin>
      • <Login>
      • <Editor>
      • <Playground>
      • <AppSettings>
      • <Text>
      • <RichText>
      • <Image>
      • <Repeater>
      • <Link>
      • usePagePublic
          #Signature#Usage example
      • usePagesPublic
      • useAuth
      • useVisualEdit
      • usePageValues
      • useReactBricksContext
      • useAdminContext
      • fetchPage
      • fetchPages
      • cleanPage
      • getPlainText
      • getPagePlainText
      • plain
      • Enums
      • Types
      • Interfaces

usePagePublic

The usePagePublic hook lets you easily retrieve the content of a page from React Bricks' APIs.

Signature#

const usePagePublic = (
slug: string,
language?: string
): types.IQueryResult<types.Page>

Usage example#

See PageViewer example with usePage

<Link>
usePagesPublic

© 2022 F2 .net engineering s.r.l.
Edit this page on GitHub