Skip to content

Commit f99c310

Browse files
authored
fix: fix dynamic rates change (#38)
1 parent e6d955c commit f99c310

File tree

3 files changed

+4
-38
lines changed

3 files changed

+4
-38
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-currency-hooks",
3-
"version": "1.2.3",
3+
"version": "1.2.4-beta.1",
44
"description": "Currency converter React hook",
55
"author": "Jakub Biesiada",
66
"license": "MIT",

src/useCurrency.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ export const useCurrency = (amount: number, options: Options) => {
5757
} else if (typeof to === 'string') {
5858
setConversion(convert(to));
5959
}
60-
61-
// eslint-disable-next-line react-hooks/exhaustive-deps
62-
}, []);
60+
}, [convert, to]);
6361

6462
return conversion;
6563
};

yarn.lock

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,7 +2200,7 @@ debug@^3.1.0:
22002200
dependencies:
22012201
ms "^2.1.1"
22022202

2203-
debuglog@*, debuglog@^1.0.1:
2203+
debuglog@^1.0.1:
22042204
version "1.0.1"
22052205
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
22062206
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
@@ -3657,7 +3657,7 @@ import-local@^3.0.2:
36573657
pkg-dir "^4.2.0"
36583658
resolve-cwd "^3.0.0"
36593659

3660-
imurmurhash@*, imurmurhash@^0.1.4:
3660+
imurmurhash@^0.1.4:
36613661
version "0.1.4"
36623662
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
36633663
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
@@ -4959,11 +4959,6 @@ lockfile@^1.0.4:
49594959
dependencies:
49604960
signal-exit "^3.0.2"
49614961

4962-
lodash._baseindexof@*:
4963-
version "3.1.0"
4964-
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
4965-
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=
4966-
49674962
lodash._baseuniq@~4.6.0:
49684963
version "4.6.0"
49694964
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
@@ -4972,33 +4967,11 @@ lodash._baseuniq@~4.6.0:
49724967
lodash._createset "~4.0.0"
49734968
lodash._root "~3.0.0"
49744969

4975-
lodash._bindcallback@*:
4976-
version "3.0.1"
4977-
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
4978-
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=
4979-
4980-
lodash._cacheindexof@*:
4981-
version "3.0.2"
4982-
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
4983-
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=
4984-
4985-
lodash._createcache@*:
4986-
version "3.1.2"
4987-
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
4988-
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
4989-
dependencies:
4990-
lodash._getnative "^3.0.0"
4991-
49924970
lodash._createset@~4.0.0:
49934971
version "4.0.3"
49944972
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
49954973
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
49964974

4997-
lodash._getnative@*, lodash._getnative@^3.0.0:
4998-
version "3.9.1"
4999-
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
5000-
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
5001-
50024975
lodash._root@~3.0.0:
50034976
version "3.0.1"
50044977
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
@@ -5039,11 +5012,6 @@ lodash.map@^4.5.1:
50395012
resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
50405013
integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=
50415014

5042-
lodash.restparam@*:
5043-
version "3.6.1"
5044-
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
5045-
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=
5046-
50475015
lodash.sortby@^4.7.0:
50485016
version "4.7.0"
50495017
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"

0 commit comments

Comments
 (0)