Frontity Tutorial
  • 👋Welcome
  • ✔️Checking your progress
  • 1️⃣ Creating a custom theme
    • Create a Frontity Project
    • Create a Theme Package
    • Modify the <Root> component
    • Connect the <Root> component to the state
  • 2️⃣ Adding a menu
    • Use the <Link> component
  • 3️⃣ Displaying posts
    • Understanding the Frontity state
    • Display the list of posts
    • Display the post content
    • Display posts and pages separately
    • Formatting the date
  • 4️⃣ Adding styling
    • Global styles
    • Styled components
    • Styling the links
    • Styling the post info
    • Add dynamic styling
  • 5️⃣ Adding behaviour
    • Use 'state' and 'actions'
    • Add pagination
  • 6️⃣ Custom Post Types
    • Add support for Custom Post Types
  • 7️⃣ Finishing touches
    • Add a <Loading> component
    • Add a 404 page
    • Use the <html2react> component
    • SEO and head tags
    • Other things to do
  • 8️⃣ Deploying the project
    • Deploy to Vercel
  • 9️⃣ Next Steps
    • Learning resources
    • Getting help and support
    • Contributing to Frontity
Powered by GitBook
On this page

5️⃣ Adding behaviour

We've just seen an example of behaviour. We've made the styling of our site change depending on the type of page we are on.

In this section we're going to make our site respond to user actions in a more direct way. We'll see how we can use properties in the state and actions, working together in tandem, to make our site interactive.

After that we'll go on to implement a key feature of any blog based website, i.e. the ability to paginate through the post listing.

By the end of this section our site will not only be looking good, but it will also have useful functionality added to it.

PreviousAdd dynamic stylingNextUse 'state' and 'actions'

Last updated 4 years ago