Skip to content

Commit

Permalink
Publish package @appsignal/[email protected]
Browse files Browse the repository at this point in the history
Update version number and CHANGELOG.md.
  • Loading branch information
unflxw committed Jul 3, 2024
1 parent 914d7bb commit 11a88b0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
26 changes: 0 additions & 26 deletions packages/react/.changesets/add-span-override-prop.md

This file was deleted.

30 changes: 30 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# AppSignal for react changelog

## 1.0.26

_Published on 2024-07-03._

### Added

- Add a span override prop to the `ErrorBoundary` and `LegacyBoundary` components.

Pass an override function to the error boundary component in order to set properties, such as tags, params or breadcrumbs, in the error span that will be sent to AppSignal.

The override function is only called when an error is about to be sent. This allows you to only perform expensive computation to add information to the error when an error will actually be reported.

When defined within a component, the function should be memoized with `useCallback` to prevent unnecessary re-renders:

```jsx
export default const SomeComponent = ({ someProp }) => {
const override = useCallback((span) => {
span.setTags({ someProp })
}, [someProp]);

return (
<ErrorBoundary override={override}>
{ /* Your component here */ }
</ErrorBoundary>
)
}
```

(patch [2ae20c2](https://github.com/appsignal/appsignal-javascript/commit/2ae20c279bf8ef416019f523a56ecd35edbd23bc))

## 1.0.25

_Published on 2024-04-23._
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@appsignal/react",
"version": "1.0.25",
"version": "1.0.26",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"repository": {
Expand Down

0 comments on commit 11a88b0

Please sign in to comment.