Skip to content
A minimal example of a browser extension using React (with Hooks!)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
dist
src
.gitignore
LICENSE
README.md
package.json
webpack.common.js
webpack.dev.js
webpack.prod.js
yarn.lock

README.md

Browser Extension using React

A minimal example of a browser extension using React (with Hooks!).

example

Installation

Requirements:

  • Google Chrome/Chromium 65+
  • Firefox 63+
  • yarn ^1.13.0

Clone this repo and install dependencies:

git clone https://github.com/herodrigues/chrome-react-minimal.git
cd chrome-react-minimal
yarn install

To run in development mode:

# watch files in development mode to './build'
$ yarn start

To run in production mode:

# build files to './dist'
$ yarn run build
Chrome
  • Open the Extensions settings (Wrench button > Tools > Extensions or navigate to chrome://extensions.
  • On the Extensions settings tab, click the "Developer Mode" checkbox.
  • Click the now-visible "Load unpacked extension..." button. Navigate to the directory where you cloned guru-extension repository, then the build/chrome directory under that.
Firefox
  • Navigate to about:debugging#addons.
  • On the Add-ons tab, click the "Enable add-on debugging" checkbox.
  • Click "Load Temporary Add-on" button. Navigate to the directory where you cloned guru-extension repository, then select the manifest.json file under the build/firefox directory.
Opera
  • Navigate to opera://extensions.
  • On the Extensions settings tab, click the "Developer mode" button.
  • Click the "Load unpacked extension..." button. Navigate to the directory where you cloned guru-extension repository, then the build/opera directory under that.
You can’t perform that action at this time.