• Stars
    star
    295
  • Rank 135,698 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Browser extension for inspection Preact applications

Preact Devtools

Browser extension that allows you to inspect a Preact component hierarchy, including props and state.

Requires Preact >=10.1.0

Screenshot of Preact devtools

Usage

Firstly, we need to import preact/debug somewhere to initialize the connection to the extension. Make sure that this import is the first import in your whole app.

// Must be the first import
import "preact/debug";

// Or if you just want the devtools bridge (~240B) without other
// debug code (useful for production sites)
import "preact/devtools";

Then, download the Preact Devtools extension for your browser:

Contributing

  • Use npm run dev to start a demo page
  • Use npm run watch to rebuild all extensions on any code changes
  • Use npm run build:firefox or npm run build:chrome to create a release build

Chrome:

  1. Go to extensions page
  2. Enable developer mode
  3. Click "Load unpacked"
  4. Select dist/chrome/ folder

Firefox:

  1. Go to addons page
  2. Click the settings icon
  3. Select "Debug addons"
  4. Click "Load temporary addon"
  5. Select the manifest.json in dist/firefox/

For extension reviewers

These commands will build the extension and load it into a browser with a temporary profile. The browser will automatically navigate to preactjs.com. There you can test the extension.

Chrome:

  1. Execute npm run run:chrome
  2. Click on Preact tab in devtools

Firefox:

  1. Exectue npm run run:firefox
  2. Open devtools + click on Preact tab in devtools

More Repositories

1

preact

βš›οΈ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
JavaScript
36,018
star
2

wmr

πŸ‘©β€πŸš€ The tiny all-in-one development tool for modern web apps.
JavaScript
4,924
star
3

preact-cli

😺 Your next Preact PWA starts in 30 seconds.
JavaScript
4,678
star
4

signals

Manage state with style in every framework
TypeScript
2,105
star
5

preact-router

🌎 URL router for Preact.
JavaScript
972
star
6

preact-compat

ATTENTION: The React compatibility layer for Preact has moved to the main preact repo.
JavaScript
951
star
7

awesome-preact

A curated list of amazingly awesome things regarding Preact ecosystem 🌟
848
star
8

preact-render-to-string

πŸ“„ Universal rendering for Preact: render JSX and Preact components to HTML.
JavaScript
574
star
9

compressed-size-action

GitHub Action that adds compressed size changes to your PRs.
JavaScript
541
star
10

next-plugin-preact

Next.js plugin for preact X
JavaScript
391
star
11

prefresh

Hot Module Reloading for Preact
JavaScript
351
star
12

preact-www

πŸ“– Preact documentation website.
JavaScript
348
star
13

preact-custom-element

Wrap your component up as a custom element
JavaScript
343
star
14

preset-vite

Preset for using Preact with the vite bundler
TypeScript
233
star
15

eslint-config-preact

Unopinionated baseline ESLint config for Preact and Preact CLI codebases.
JavaScript
85
star
16

enzyme-adapter-preact-pure

Preact adapter for the Enzyme UI testing library
TypeScript
67
star
17

preact-ssr-prepass

Drop-in replacement for react-ssr-prepass
JavaScript
47
star
18

preact-integrations

A collection of sample apps demonstrating Preact's compatibility with various 3rd party libraries
JavaScript
35
star
19

rfcs

RFCs for changes and ideas in relation to Preact
30
star
20

create-preact

Create a Vite-powered Preact app in seconds
JavaScript
24
star
21

babel-plugin-transform-replace-expressions

A Babel plugin for replacing expressions with other expressions
JavaScript
23
star
22

jest-preset-preact

Jest preset for testing Preact apps
JavaScript
19
star
23

babel-plugin-transform-rename-properties

A Babel plugin for renaming JavaScript properties
JavaScript
19
star
24

preact-netlify

Preact's netlify CMS template
JavaScript
16
star
25

legacy-compat

React 15 compatibility layer for Preact
JavaScript
16
star
26

playwright-ct

Preact adapter for Playwright Component testing
TypeScript
15
star
27

preact-iso

Isomorphic utilities for Preact
JavaScript
12
star
28

compat-alias-package

JavaScript
10
star
29

babel-plugin-transform-hook-names

Add custom hook names for devtools
TypeScript
7
star
30

migrate-preact-x

JavaScript
6
star
31

preact-cli-experiment

TypeScript
4
star
32

codesandbox-template

JavaScript
4
star
33

.github

Default community files for the PreactJS organization
3
star