Skip to content

Commit

Permalink
chore(format): format the world
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaskasky committed Sep 24, 2024
1 parent 8f34eed commit 26a7719
Show file tree
Hide file tree
Showing 29 changed files with 888 additions and 1,137 deletions.
26 changes: 5 additions & 21 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"plugin:@typescript-eslint/recommended",
"airbnb",
"plugin:prettier/recommended"
],
"extends": ["plugin:@typescript-eslint/recommended", "airbnb", "plugin:prettier/recommended"],
"env": {
"browser": true
},
Expand All @@ -29,15 +25,9 @@
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
],
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"react/button-has-type": "off",
"react/jsx-filename-extension": [
"error",
{ "extensions": [".js", ".tsx"] }
],
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".tsx"] }],
"react/prop-types": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-no-useless-fragment": "off",
Expand All @@ -55,10 +45,7 @@
"no-unused-vars": "off",
"no-redeclare": "off",
"camelcase": ["error", { "allow": ["^INTERNAL_", "^unstable_"] }],
"react/function-component-definition": [
"error",
{ "namedComponents": "function-declaration" }
],
"react/function-component-definition": ["error", { "namedComponents": "function-declaration" }],
"react/no-unescaped-entities": "off",
"react/no-array-index-key": "off",
"react/require-default-props": "off",
Expand All @@ -73,10 +60,7 @@
"jest": true
},
"rules": {
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": true }
]
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
}
},
{
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,67 @@
## [Unreleased]

## [0.6.0] - 2024-05-07

### Changed

- feat(scope): support using derived atom in ScopeProvider (#30)

## [0.5.2] - 2024-04-30

### Changed

- feat(isolation): export useStore hook using the isolated context (#27)

## [0.5.1] - 2024-01-30

### Changed

- fix(isolation): fix prop types #15

## [0.5.0] - 2024-01-26

### Changed

- feat(scope): A complete rewrite of ScopeProvider #20

## [0.4.1] - 2023-11-01

### Changed

- feat(scope): Avoid extra re-renders with memoization #10

## [0.4.0] - 2023-10-24

### Added

- feat(scope): patch store to avoid patching hooks #9

## [0.3.1] - 2023-10-24

### Changed

- fix(scope): useScopedAtom and useHydrateAtoms #7

## [0.3.0] - 2023-10-23

### Added

- feat(scope): new implementation scoping atoms instead of store #5

## [0.2.0] - 2023-10-01

### Added

- new scope util #2

## [0.1.1] - 2023-04-21

### Changed

- refactor: simplify the use of useHydratedAtoms #1

## [0.1.0] - 2023-04-20

### Added

- Initial release
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ https://jotai.org/docs/integrations/scope
Taking the following setting in mind:

```javascript
const base = atom(0);
const derived1 = atom((get) => get(base));
const derived2 = atom((get) => get(base));
const base = atom(0)
const derived1 = atom((get) => get(base))
const derived2 = atom((get) => get(base))

const Component = () => {
useAtom(base);
useAtom(derived1);
useAtom(derived2);
};
useAtom(base)
useAtom(derived1)
useAtom(derived2)
}
```

### Example1: base and derived1 are scoped
Expand Down
Loading

0 comments on commit 26a7719

Please sign in to comment.