-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update getState to return an array, which could be extracted like react useState. #14
Comments
Hey rabisnaqvi, I changed the getState function to how you mentioned above. How can I create a pull request? |
Are you able to give me write access? Or should I fork the repo, make the changes then submit a PR that way? |
Hey @Siar416 , thanks for contributing to this! you can create a branch from the issue, and then generate a PR to merge into the "release-candidate" branch. you can try that, if you face any permission issues then let me know I'll get that sorted. |
Thanks for the fast response. I forked the repo and created a branch. Made the changes and submitted a PR from my forked branch to the release-candidate branch. Sent from my iPhoneOn May 24, 2023, at 2:19 PM, Rabis Naqvi ***@***.***> wrote:
Hey @Siar416 , thanks for contributing to this! you can create a branch from the issue, and then generate a PR to merge into the "release-candidate" branch. you can try that, if you face any permission issues then let me know I'll get that sorted.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
…ct useState.#14 Updated unit tests to match the updated response from Astral.context.getState.
…eact usestate (#21) 🤯 Update getState to return an array, which could be extracted like react useState.#14 * 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. * Update getState to return an array, which could be extracted like react useState.#14 * Updated unit tests to match the updated response from Astral.context.getState. --------- Co-authored-by: Siar <[email protected]> Co-authored-by: Rabis Naqvi <[email protected]>
- 🤯 Updated the getState function to return an array (tuple) similar to how React's useState hook works (#14 ) - ✅ Updated unit tests to match the updated response from Astral.context.getState. - 📃 Fix broken hyperlink in the Getting Started section (#26 ) - Replaced the broken hyperlink reference with the correct anchor link to the "Core Concepts" section. - Ensured that the anchor link matches the heading in the "Core Concepts" section. - 🌀 Integrate Typescript or babel (#15 ) - Converted all the source files to TypeScript namespaces. - Updated build process to parse the javascript files. - Replaced JSDOC with TypeDoc to generate documentation for the new typescript codebase. - Updated ESLINT configuration to be integrated with TypeScript. - Added some unit tests. - 📃Break features and definitions into different lines in readme (#24 ) - Updated readme.md to fix the line breaks and to reflect new updated features in Astral.context.getState and Astral.context.updateState. - 📃Updated CONTRIBUTING.md - Updated CONTRIBUTING.md to ensure updated contributing processes. --------- Co-authored-by: Rabis Naqvi <[email protected]> Co-authored-by: Siar <[email protected]> Co-authored-by: HARSH SRIVASTAV <[email protected]>
Update getState to return an array, which could be extracted like react useState.
so it would be something like this:
const [count, onCountChange] = Astral.context.getState('count');
The text was updated successfully, but these errors were encountered: