Skip to content
This repository was archived by the owner on Apr 27, 2022. It is now read-only.
Juan Lulkin edited this page Oct 20, 2016 · 3 revisions

When consuming the ui library you can choose to use React or Preact. Preact is a React API compatible library but with a much smaller footprint, making your builds leaner.

When using React, just install react and react-dom in your project and it will work by default. When using Preact, you will have to alias it to replace react, so first install preact and preact-compat:

npm install preact preact-compat --save

Then, add the following to your webpack build:

resolve: {
  alias: {
    react: "preact-compat",
    "react-dom": "preact-compat"
  }
}

Preact gotchas

TODO

Clone this wiki locally