Skip to content

Conversation

gaymeowing
Copy link

@gaymeowing gaymeowing commented Sep 29, 2025

Rewrites ReactBinding to be cleaner, and also use less memory as its now properly using metatables.

  • Improve error messages
  • Removes use of pairs()
  • Removes impl table jank
  • Removes createSignal as its no-longer used
  • Remove BindingInternal type as its useless (will be replacing with proper types for each prototype table and each type of binding in React Next, I just cant be bothered to do proper types when its going to be thrown out soon anyways)
  • Rename BindingInternalApi table to ReactBinding
  • Mark __subscribeToBinding as depricated as every binding now has a :_subscribe() method that should be used instead
  • Makes RobloxComponentProps use _:subscribe()
  • Make the update function not iterate twice when firing off callbacks
  • Signal implementation for bindings now uses less memory, as it only uses one table for storing callbacks and nolonger creates connection objects

Checklist before submitting:

  • Added/updated relevant tests
  • Added/updated documentation

@gaymeowing
Copy link
Author

gaymeowing commented Sep 30, 2025

image

Ran on:

image

Benchmark place: ReactBindingRewriteBenchmark.zip

* make naming of bindings consistent
* improve error messages
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.

1 participant