nucleo
nucleo copied to clipboard
[RELEASE 2.0.0]
Changes summary
- simplify documentation for better understanding with simpler examples;
- improve how
updateworks for empty states (when they are just created); - aim for removing or create a deprecation process for
dispatchfunction; - logo (finally);
- improvements in type declarations for several areas pointed by the project
eslinttoday; - Change API usage to a more modern approach (breaking change);
- Lists of Objects being able to be created without all fields, setting the missing ones as null;
- Study the ability to push to Lists
Changelog
1. simplify documentation for better understanding with simpler examples
WIP
2. improve how update works for empty states (when they are just created)
The update algorithm received some design improvements, but the main change that made it possible to update data never dispatched was creating the store with its keys in null or empty values.
3. aim for removing or create a deprecation process for dispatch function
The dispatch function will be entirely removed of use. The new API for Nucleo does not fit this method anymore and an update like method will be used for all kinds of updates to the store.
4. logo (finally)
WIP
5. improvements in type declarations for several areas pointed by the project Eslint today
- For declaring a new state it deeply verifies if the argument being sent is an instance of Nucleo object and all keys inside
fieldsare verified as well.
6. Change API usage to a more modern approach (breaking change)
Mostly, working on that. Here's a preview:
const User = new NucleoObject({ ... });
const [user, updateUser, subscribe] = useNucleoState(User);
7. Lists of Objects being able to be created without all fields, setting the missing ones as null
WIP
8. Study the ability to push to Lists
TL;DR; not possible right now.
I would have to create a query API like MongoDB and it would add substantial extra work on this. I'm studying the possibility of Nucleo State receive atomic items and lists as well, not only "Objects" HashMaps, like:
const [users, push, pop] = new NucleoList(); // defaults to []
const [age, setAge] = new NucleoNumber(); // defaults to null