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

Typo in README example #4

Open
mindplay-dk opened this issue Aug 13, 2024 · 4 comments
Open

Typo in README example #4

mindplay-dk opened this issue Aug 13, 2024 · 4 comments

Comments

@mindplay-dk
Copy link

This doesn't look right, does it? 🙂

const count = $(count);

@abhishiv
Copy link
Owner

Hey @mindplay-dk

Nice to see you!

Actually, both styles are supported since some people find passing the token to signal confusing since they assume it would be a setter.

This style is also required for reading stores since you can't pass any token to the cursor in that case.

But I think I should update the readme to make this more explicit and clear.

@mindplay-dk
Copy link
Author

I think you misundertood my point? This isn't valid code.

Squint hard and you should see it? 😅

@abhishiv
Copy link
Owner

haha ah stupid me! I think I needed some sleep. Will fix.

@mindplay-dk
Copy link
Author

Another typo:

const Page = component("HomePage", (props, { signal, wire }) => {

The actual function is Page, but gets labeled HomePage.

I'm sure that's the name it had at some point - it kind of highlights the minor problem with this pattern. And I completely get why you're doing that, but this is why most libraries don't.

That said, I've wondered about this exact thing a hundred times before, and I don't think there is any good solution to this problem. 🤔

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

2 participants