littensy / reflex Goto Github PK
View Code? Open in Web Editor NEW♻️ An all-in-one state container for Roblox
Home Page: https://littensy.github.io/reflex/
License: MIT License
♻️ An all-in-one state container for Roblox
Home Page: https://littensy.github.io/reflex/
License: MIT License
Currently, the broadcaster state-getter calls getState on every producer in the map. This is prone to bugs since the combined producer does not update the state of the individual producers!
Pass the root producer to Broadcaster, and filter out non-shared state when a player retrieves state.
Write tests to make sure this bug doesn't come back.
It's possible to allow an action to return a Promise to defer a state update. Actions run independently from one another, and they get called directly, so it should be safe to allow it
But why do some state management libraries allow async actions while others don't?
Combine subscribe and observe into a single function with overloads for both cases.
producer.subscribe(callback)
producer.subscribe(selector, callback)
Look into integrating a Luau analyzer and run-in-roblox into the CI process
When changes are repeatedly made in a Heartbeat
or RenderStepped
connection, the subscribe()
method doesn't detect the changes.
This should be straightforward to implement and simplifies some functions.
We might be able to define multiple overloads with:
local arguments = select("#", ...)
local selector, predicate, listener
if arguments == 1 then
listener = ...
elseif arguments == 2 then
selector, listener = ...
else
selector, predicate, listener = ...
end
I ran a benchmark, and combineProducers
is over 100% slower than manually combining state in a single producer. Optimizations can be made to reduce overhead from wrapping producers.
Release this package for Luau on Wally.
Imports can be resolved with a function that checks Reflex's parent for a package of the same name and a possible src
or out
entry point.
Promise will need to be re-exported and attempt to import any installed Promise module as a dependency first.
Reflex should throw more descriptive errors for oversights like:
state
inputobserve
receiving a record of objects with no discriminator
I should make one with Moonwave
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.