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

14 update getstate to return an array which could be extracted like react usestate #21

Conversation

rabisnaqvi
Copy link
Owner

  • Updated the getState function to return an array similiar to how useState hook works
  • Minor adjustment, instead of passing setState we are now passing a lister function instead.
  • Updated unit tests to match the updated response from Astral.context.getState.

Siar416 and others added 2 commits May 25, 2023 13:22
* Updated the getState function to return an array similiar to how useState hook works

* Minor adjustment, instead of passing setState we are now passing a lister function instead.
…ct useState.#14

Updated unit tests to match the updated response from Astral.context.getState.
@rabisnaqvi rabisnaqvi added enhancement New feature or request good first issue Good for newcomers labels May 25, 2023
@rabisnaqvi rabisnaqvi self-assigned this May 25, 2023
@coveralls
Copy link
Collaborator

coveralls commented May 25, 2023

Pull Request Test Coverage Report for Build 5077901134

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.032%

Totals Coverage Status
Change from base Build 5073113641: 0.0%
Covered Lines: 140
Relevant Lines: 149

💛 - Coveralls

@rabisnaqvi rabisnaqvi merged commit 62b3150 into release-candidate May 25, 2023
6 checks passed
@rabisnaqvi rabisnaqvi deleted the 14-update-getstate-to-return-an-array-which-could-be-extracted-like-react-usestate branch May 25, 2023 08:47
@rabisnaqvi
Copy link
Owner Author

@Siar416 thanks for contributing to this project! really appreciated. I have merged the changes after updating the unit tests etc ✨
It'd be great if you could star the project! means a lot to me :))

@Siar416
Copy link
Contributor

Siar416 commented May 25, 2023

@rabisnaqvi Thank you for giving me the opportunity to contribute to the project. I've given the project a star!

Have you considered changing variables from "var" to "let" or "const"? Would be happy to start making those updates.

@rabisnaqvi
Copy link
Owner Author

@Siar416 Thankyou!

About the scoped initializations, Yup actually I have planned to do that. I have created an issue (#15) to integrate babel or typescript into the project. once that is done we can use all the modern javascript features. but yes, you can start making those changes for now as most major browsers will support them.

Also if you plan to start working on that, I thought that it would be good if we created pr for an internal feature branch rather than for the release-candidate. we could then merge the feature branch with the release candidate.

@Siar416
Copy link
Contributor

Siar416 commented May 25, 2023 via email

@rabisnaqvi
Copy link
Owner Author

Yup, that is correct! I have created an internal branch (15-integrate-typescript-or-babel), when you want, you can create a pull request to this internal branch rather than release-candidate.

@Siar416
Copy link
Contributor

Siar416 commented May 25, 2023 via email

@rabisnaqvi rabisnaqvi removed their assignment May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

Successfully merging this pull request may close these issues.

None yet

3 participants