Skip to content

Conversation

@tfluehr
Copy link

@tfluehr tfluehr commented Apr 19, 2024

I had a need for a callback to dynamically build the query params. Sharing the approach I put together.

Add an additional story to demonstrate it in action.

Feel free to change as needed if you find it useful

Copy link
Member

@Sidnioulz Sidnioulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @tfluehr!

Would you be kind enough to set up tests for this? Having multiple types on the same data structure is probably when this package starts needing unit tests to handle edge cases and wrong input types.

Also, we would need an update to the README with a documented example. It would be easier to understand that example if it only had the query function and not mapParams. Having mapParams made me question for a moment why I couldn't mock data in my render function, which diverted me from appreciating the actual benefit of the feature.

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

Successfully merging this pull request may close these issues.

2 participants