Add actionCreators to StoreDevToolsOptions
Which @ngrx/* package(s) are relevant/related to the feature request?
store-devtools
Information
As instructed by Chrome Redux devtools extension, we can add our built-in actions creators to devtools to be able to manually dispatch them afterward.
It would be nice to include that feature in NgRx StoreDevTools.
Describe any alternatives/workarounds you're currently using
No response
I would be willing to submit a PR to fix this issue
- [ ] Yes
- [x] No
Can work on that if there interest in adding that option.
Hi, yeah it could be a great tool for testing/debugging purpose! I’m sure that people would love that. Writing each time new action in json format is quite boring.Thank you!David QuirionLe 18 sept. 2023 à 10:44, Mateusz Stefańczyk @.***> a écrit : Can work on that if there interest in adding that option.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
@va-stefanek feel free to pick this one up if you'd like that.
@timdeschryver @devkirr, I would appreciate your input on the following matter.
I have conducted some investigation, and by the end of the day, what we would be able to achieve is displaying the expected property for dispatching an action, which is just 'props.' However, we wouldn't have information about what exactly this 'props' consists of and what kind of parameters it expects.
Take the following code as an example:
export const loadBook = createAction(
'[Book Exists Guard] Load Book',
props<{ book: Book }>()
);
This code would be evaluated to something like the image shown below:
This limitation is not specific to NgRx but rather general limitation. We are currently unable to extract the argument type to properly display what kind of parameters a given action accepts.
Please let me know if you find this limitation acceptable and if it adds value to your work in its current form.
Thanks for the investigation. If I understood correctly, I’ll be able to see in a sort of dropdown all my NgRx actions with a props input if the action as one configured? Well of course the name/typing of props would be fantastic but just without having to copy/format the action with the proper name and props in a json string would be a great improvement.
Any progress here? @va-stefanek raw js object-like input would be OK for the first implementation. Hope you can help the whole community with it 🙏