nank1ro / solidart

Signals in Dart and Flutter, inspired by SolidJS
https://docs.page/nank1ro/solidart
MIT License
155 stars 5 forks source link

[chore] Rename `resource` param to `state` #38

Closed manuel-plavsic closed 1 year ago

manuel-plavsic commented 1 year ago

I think that state is much more suitable than the current resource. Also, it actually is the resource.state itself after all...

This will be especially helpful when using autocomplete.

codecov[bot] commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (dev@d1f0d04). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##             dev      #38   +/-   ##
======================================
  Coverage       ?   97.72%           
======================================
  Files          ?       17           
  Lines          ?      704           
  Branches       ?        0           
======================================
  Hits           ?      688           
  Misses         ?       16           
  Partials       ?        0           
manuel-plavsic commented 1 year ago

I just thought that we could also rename it to resourceState or remove the param entirely and simply use resource.state... What do you think?

nank1ro commented 1 year ago

I already did this change in solidart_lint for the Wrap with ResourceBuilder assist but I forgot to propagate the change here. Name it resourceState like in solidart_lint. state is not good because it conflicts with the state of the StatefulWidget

manuel-plavsic commented 1 year ago

Done :)