Skip to content

Commit

Permalink
update example (#8)
Browse files Browse the repository at this point in the history
Co-authored-by: Tate <[email protected]>
  • Loading branch information
tatethurston and Tate authored Jan 20, 2022
1 parent e17882e commit cc4b150
Show file tree
Hide file tree
Showing 10 changed files with 368 additions and 416 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line no-undef
module.exports = {
root: true,
ignorePatterns: ["dist", "examples"],
ignorePatterns: ["dist", "example"],
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
dist/*
examples/dist/*
!examples/dist/index.html
example/dist/*
!example/dist/index.html

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Note that in addition to the hook, the component must be wrapped with `withError

This was done to avoid hooking into React internals, which would otherwise be required. The hope is that the eventual React hook solution will present a similar API, and users can easily migrate by removing the `withErrorBoundary` wrapper.

For a full project example take a look at the [examples directory](https://github.com/tatethurston/react-use-error-boundary/blob/main/examples).
For a full project example take a look at the [example](https://github.com/tatethurston/react-use-error-boundary/blob/main/example).

## Known Limitations ⚠️

Expand All @@ -97,7 +97,7 @@ Because React recreates the component tree from scratch after catching an error,

🎁 Zero run time dependencies

🦶 Small footprint [673 B minified and gzipped](https://bundlephobia.com/[email protected].0)
🦶 Small footprint [673 B minified and gzipped](https://bundlephobia.com/[email protected].2)

🪐 Isomorphic / Universal -- safe to run in any JS context: the browser or on a server

Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions examples/package.json → example/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "examples",
"name": "example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "yarn webpack && open dist/index.html"
},
"author": "Tate Thurston <[email protected]>",
"license": "ISC",
"devDependencies": {
"@types/react-dom": "^17.0.3",
"ts-loader": "^9.0.0",
"typescript": "^4.2.4",
"webpack": "^5.34.0",
"webpack-cli": "^4.6.0"
"@types/react-dom": "^17.0.11",
"ts-loader": "^9.2.6",
"typescript": "^4.5.5",
"webpack": "^5.66.0",
"webpack-cli": "^4.9.1"
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-use-error-boundary": "^0.0.2"
"react-use-error-boundary": "^1.0.2"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
756 changes: 354 additions & 402 deletions examples/yarn.lock → example/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"strict": true,
"target": "ESNext"
},
"exclude": ["node_modules", "dist", "examples"]
"exclude": ["node_modules", "dist", "example"]
}

0 comments on commit cc4b150

Please sign in to comment.