Comments (2)
I'm really happy to hear that you want to give this library a go!
This is one of the things that I was struggling with while doing the initial design of Tyin. I first did three separate stores (vanilla, object, array), as you suggested, but when migrating dott.bio from zustand to Tyin, I noticed that the extra imports generally didn't bother me, CMD + . (autoimport) generally helps a lot. Most stores ended up producing <10 lines of code, even with the imports—which is A-OK with me.-
I also reasoned that, with the reducer plugin coming up, I don't want to give preference to "some plugins". Should there be a reducerStoreHook
too? what about a persistedStoreHook
? With #9 in mind, what about a loadableStoreHook
? I don't mean this in a snide way, I just don't know where to draw the line right now. There is likely some "middle way" here, but I'm still working on seeing it!
from tyin.
Yeah, I guess it isn't much code that is written, but it looks nicer and cleaner when it is used.
In a bigger project I would probably make some pre-configured stores that are commonly used directly in the application code.
I guess you could have a hooks module for each plugin, e.g. tyin/plugin-object-hooks
. Or maybe you should create a new tyin-react
project that imports tyin
and adds React hooks support with hooks for the plugins as well (where applicable). You will get rid of the react
dependency as well in tyin
and the examples could be more targeted to the usage with React.
from tyin.
Related Issues (2)
- Feature request: Loaders HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tyin.