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

[DIS-615] Match the functionality of useState and useReducer in React #29

Closed
paulgb opened this issue Feb 5, 2023 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@paulgb
Copy link
Member

paulgb commented Feb 5, 2023

  • useSharedState should allow a function to be passed instead of a literal value. The function is evaluated on the current (local) value of the state.
  • useSharedReducer should take an optional init function that takes the prior argument and returns the first state.

The functions will still differ from their React counterparts in that they will take a key as the first parameter.

DIS-615

@paulgb paulgb added the linear label Feb 6, 2023
@paulgb paulgb changed the title Match the functionality of useState and useReducer in React [DIS-615] Match the functionality of useState and useReducer in React Feb 6, 2023
@paulgb paulgb self-assigned this Feb 6, 2023
@paulgb paulgb modified the milestone: v.56 Feb 8, 2023
@paulgb paulgb closed this as completed Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant