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

pizzaxから(静的な)stateを削除する? #8129

Closed
tamaina opened this issue Jan 9, 2022 · 4 comments
Closed

pizzaxから(静的な)stateを削除する? #8129

tamaina opened this issue Jan 9, 2022 · 4 comments
Labels
💬Discussion Being discussed or needs discussion ✨Feature This adds/improves/enhances a feature packages/frontend Client side specific issue/PR

Comments

@tamaina
Copy link
Member

tamaina commented Jan 9, 2022

Summary

静的なstateを別に定義しておく必要のある場面はないように思える。reactiveStateがあれば十分そう。

削除する理由は…メモリの節制とか。

@tamaina tamaina added 💬Discussion Being discussed or needs discussion ✨Feature This adds/improves/enhances a feature packages/frontend Client side specific issue/PR labels Jan 9, 2022
@tamaina
Copy link
Member Author

tamaina commented Jan 13, 2022

パフォーマンス的にstateを使ったほうがいい場面も多いからナシだな

@tamaina tamaina closed this as completed Jan 13, 2022
@syuilo
Copy link
Member

syuilo commented Jan 13, 2022

パフォーマンス的にstateを使ったほうがいい場面も多いからナシだな

例ある?

@tamaina
Copy link
Member Author

tamaina commented Jan 13, 2022

たとえば絵文字ピッカーの表示でポップアップにするかどうか設定から検討する↓

:prefer-type="asReactionPicker && defaultStore.state.reactionPickerUseDrawerForMobile === false ? 'popup' : 'auto'"

のような場面ではリアクティブである意味がない。
リアクティブが必要のない場面でリアクティブにするとvueのコストが増えて返って重くなる(かもしれないという感覚的な判断)

@syuilo
Copy link
Member

syuilo commented Jan 13, 2022

あーそうね
そういう理由でreactiveStateと静的stateを分けてたの思い出した
特に大量にレンダリングされるコンポーネントだと影響ありそう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬Discussion Being discussed or needs discussion ✨Feature This adds/improves/enhances a feature packages/frontend Client side specific issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants