Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RELEASE 2.0.0] #44

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft

[RELEASE 2.0.0] #44

wants to merge 27 commits into from

Conversation

mtmr0x
Copy link
Owner

@mtmr0x mtmr0x commented Dec 10, 2020

Changes summary

  1. simplify documentation for better understanding with simpler examples;
  2. improve how update works for empty states (when they are just created);
  3. aim for removing or create a deprecation process for dispatch function;
  4. logo (finally);
  5. improvements in type declarations for several areas pointed by the project eslint today;
  6. Change API usage to a more modern approach (breaking change);
  7. Lists of Objects being able to be created without all fields, setting the missing ones as null;
  8. 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 fields are 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

@mtmr0x mtmr0x added feature New feature (in Roadmap) documentation Improving or fixing documentation labels Dec 10, 2020
@mtmr0x mtmr0x added this to the 2.0.0 milestone Dec 10, 2020
@mtmr0x mtmr0x self-assigned this Dec 10, 2020
@mtmr0x mtmr0x closed this Dec 13, 2020
@mtmr0x mtmr0x reopened this Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improving or fixing documentation feature New feature (in Roadmap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant