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

Version 0.51.2 broke tributejs usage. #295

Open
raivil opened this issue Feb 28, 2023 · 8 comments
Open

Version 0.51.2 broke tributejs usage. #295

raivil opened this issue Feb 28, 2023 · 8 comments

Comments

@raivil
Copy link

raivil commented Feb 28, 2023

Hi,

Upgrading to version 0.51.2 broke some features based on tributejs.

The change from #252 (useDispatch: Fix params for debounced actions if event is shared ) seems to be the cause.

I've opened an issue on Tributejs as well at zurb/tribute#892

The current error is:

index.js:979 Uncaught TypeError: Cannot create property 'params' on string '/user/mentions'
    at index.js:979:47
    at Array.forEach (<anonymous>)
    at s (index.js:979:18)
@marcoroth
Copy link
Member

Hey @raivil, thanks for reporting this issue!

I'm pretty sure this is an issue on stimulus-use's side. I saw you shared a snippet of your code in zurb/tribute#892, but would you mind posting the whole Stimulus controller? And if possible also the HTML around it so I can debug this and narrow it down?

Even better would be if you could provide a reproduction in a Codepen. Thank you!

@raivil
Copy link
Author

raivil commented Mar 13, 2023

Hey @marcoroth
Sorry but it will be a little hard to post everything, the code is protected and it's also generated by other components, which makes it a little bit more complex.

@marcoroth
Copy link
Member

Hey @raivil, yeah I understand. It doesn't need to be everything, but it would be awesome to have a minimal, reproducible example so we know we are talking about the same thing, since this seems like a rather complex and non-trivial setup.

Because otherwise it would be a lot of guesswork since we would also need to figure out how Tribute works and how it could be used with stimulus-use. At least personally, I haven't used it myself. Thank you for your understanding!

@weaverryan
Copy link
Contributor

Hi!

Here is a reproducer: https://jsfiddle.net/gyjfxs27/6/

Unless I'm missing something, useDebounce seems quite broken. It seems that you HAVE to pass an object with a params key now when calling a debounced method.

Does that help? Is that bug, or am I misunderstanding the proper use?

Thanks!

@mepatterson
Copy link

Any news on this? useDebounce is one of my favorites in this library and just hit this same error...

@marcoroth
Copy link
Member

I just got into my first work-week after RailsConf. I'm trying to take a look this week. Thanks for your patience!

@endelwar
Copy link

endelwar commented Sep 6, 2023

Hi @marcoroth, have you had time to look at this issue?

@endelwar
Copy link

Any update on 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

5 participants