Installation
With npm or yarn
Add the@appsignal/preact and @appsignal/javascript packages to your package.json. Then, run npm install/yarn install.
You can also add these packages to your package.json on the command line:
With JSPM.io import maps
Using the JSPM.io import map generator, you can generate an import map for your application’s dependencies. Add@appsignal/javascript and @appsignal/preact to the dependencies list in the generator, then add the generated import map and ES module shims to your application’s code.
With rails-importmap
Use the following command to add these packages to your Rails application’s import maps:
Usage
Error Boundary
If you are using Preact v10.0.0 or higher, you can use theErrorBoundary component to catch errors from anywhere in the child component tree.