Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is not this working? #397

Open
hirppa opened this issue Jun 22, 2022 · 2 comments
Open

Why is not this working? #397

hirppa opened this issue Jun 22, 2022 · 2 comments

Comments

@hirppa
Copy link

hirppa commented Jun 22, 2022

const test = currency(0);
test.add(1);

console.log(test.value); // 0 instead of 1

@eXamadeus
Copy link

eXamadeus commented Jun 24, 2022

It's immutable.

const a = currency(0);
const b = a.add(1);

console.log(a.value); // 0
console.log(b.value); // 1

It's one of the main features:
image

@mattgaspar
Copy link

Something like the example above from @eXamadeus should be in the readme. I know it says Immutable in the features but if this gets glossed over none of the examples address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants