summaryrefslogtreecommitdiff
path: root/examples/snowpack/src/pages/guides/preact.md
blob: 060ff1e89fc914c6be64e3c20b06d650d0a302d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
layout: ../../layouts/content.astro
title: Preact
tags: communityGuide
img: '/img/logos/preact.svg'
imgBackground: '#333333'
description: With Snowpack you can import and use Preact without any custom configuration needed.
---

You can import and use Preact without any custom configuration needed.

**To use `preact/compat`:** (the Preact+React compatability layer) alias the "compat" package to React in your install options:

```js
// Example: Lets you import "react" in your application, but uses preact internally
// snowpack.config.json
"alias": {
    "react": "preact/compat",
    "react-dom": "preact/compat"
}
```