Frontity release: Fix bug caused after updating Frontity and new features

New features

  1. We have made easier to work with searches and pagination:
    • We added these new properties to the data object returned by state.source.get(someLink) in all entities:

data.link : the link. (link is short for permalink)
data.page : the page number.
data.route : the link without the pagination part.
data.next : the link of the next page in an archive.
data.previous : the link of the previous page in an archive.
data.isSearch : true for links that are searches.
data.searchQuery : the value of the search.

  1. New Switch component to improve the route between pages.
  • Easier routing:
          <Switch>
            <Loading when={data.isFetching} />
            <SearchResults when={isSearch} />
            <Archive when={data.isArchive} />
            <Post when={data.isPostType} />
            <PageError when={data.isError} />
          </Switch>
    
  • More info on the Feature Discussion and the Switch component documentation.

We updated both our twentytwenty-theme and mars-theme starter themes so you can check how easy it is at mars-theme pagination and twentytwenty-theme search

  1. We’ve changed the API of html2react processors to make it even more powerful. Now you can access the state and libraries of your project inside them.

Bug fixes

  • Error after upgrading Frontity: In some cases, after updating Frontity, they were getting an Internal Server Error. #329
  • Correctly import type declarations from the @frontity/type-declarations package. #319

:bulb: To keep Frontity and its packages updated, you can follow this guide of our documentation.


Packages Changelog


[email protected]

Patch Changes


@frontity/[email protected]

Minor Changes


@frontity/[email protected].1

Minor Changes

  • e8210ee9 #253 Thanks @michalczaplinski! - We have made easier to work with searches and pagination by adding this new properties to the data object returned by state.source.get(someLink) :In all entities:
    • data.link : the link (short for permalink).
    • data.page : the page number.
    • data.route : the link without the pagination part.In archives:
    • data.next : the link of the next page in an archive.
    • data.previous : the link of the previous page in an archive.In searches:
    • data.isSearch : true for links that are searches.
    • data.searchQuery : the value of the search.

Patch Changes

  • b3225692 #329 Thanks @luisherranz! - Remove @frontity/connect from dependencies to avoid multiple imports and fix the problem people is having when they are updating Frontity.
  • cdc84d57 #335 Thanks @luisherranz! - Fix isFetching not turning to true when data exists. It may happen in cases where we are fetching that data in the embed of others. Like for example, taxonomies in posts.

@frontity/[email protected]

Minor Changes

  • e8210ee9 #253 Thanks @michalczaplinski! - We have made easier to work with searches and pagination by adding this new properties to the data object returned by state.source.get(someLink) :In all entities:
    • data.link : the link (short for permalink).
    • data.page : the page number.
    • data.route : the link without the pagination part.In archives:
    • data.next : the link of the next page in an archive.
    • data.previous : the link of the previous page in an archive.In searches:
    • data.isSearch : true for links that are searches.
    • data.searchQuery : the value of the search.

@frontity/[email protected]

Minor Changes


@frontity/[email protected]

Minor Changes

  • 9cfc178d #327 Thanks @DAreRodz! - Add the possibility to access state and libraries at the processors so users can use settings or functionalities stored there.

@frontity/[email protected]

Minor Changes


@frontity/[email protected]

Minor Changes


@frontity/[email protected]

Minor Changes

Patch Changes


@frontity/[email protected]

Patch Changes


@frontity/[email protected]

Patch Changes


@frontity/[email protected]

Patch Changes

2 Likes