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

perf(createUseStorageState): remove optional chaining #2241

Merged
merged 2 commits into from Jul 5, 2023

Conversation

jiaowoxiaobala
Copy link
Contributor

@jiaowoxiaobala jiaowoxiaobala commented Jun 30, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

💡 Background and solution

options有默认值 {},并且在代码28行进行了解构。所以后面使用options时不需要?. (像useCookieState中那样)

img

📝 Changelog

Language Changelog
🇺🇸 English Remove optional chaining in the createUseStorageState code
🇨🇳 Chinese 去除createUseStorageState中操作options时的可选链运算符

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@CLAassistant
Copy link

CLAassistant commented Jun 30, 2023

CLA assistant check
All committers have signed the CLA.

@liuyib liuyib changed the title perf: Optional chaining ?. perf(createUseStorageState): remove optional chaining Jul 2, 2023
@crazylxr crazylxr merged commit e862245 into alibaba:master Jul 5, 2023
8 checks passed
askwuxue pushed a commit to askwuxue/hooks that referenced this pull request Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants