preact.memo or preact.PureComponent?

Created on 2 Jun 2019  路  2Comments  路  Source: preactjs/preact

I am using preact@next and can't seem to find the memo function or the PureComponent class.
are they included in Preact? If not, what's the best way to use a "memo" functional component?

question

All 2 comments

Both of those reside within preact/compat, not within the base.

As @pmkroeker said: These functions are part of the preact/compat export.

import { memo, PureComponent } from "Preact/compat"
Was this page helpful?
0 / 5 - 0 ratings