Skip to content

Conversation

@aceysmith
Copy link
Contributor

@aceysmith aceysmith commented Dec 27, 2025

Description of Changes

Update the useTable hook in the spacetimedb/react package to use the client language convention aware table accessor key to lookup the correct table

API and ABI breaking changes

None

Expected complexity level and risk

1

Testing

I built and ran a client using this code change before and after. Previously with multi-word table names in rust module (i.e. crew_assignments table), the useTable hook would fail to lookup the table information and hookup the onInsert/onDelete/onUpdate callbacks. With this change, they successfully connect and data returned by the useTable hook now flows.

All of my testing was with module_bindings generated with the 1.11.0 rust module crate. Additional testing for backwards compatibility might be useful. I'm not sure what the clockwork labs target is for that sort of thing.

Copy link
Contributor

@kistz kistz left a comment

Choose a reason for hiding this comment

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

After testing I can confirm that this patch works as expected and my multi word table and views names show the desired output :)

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