orenmizr

orenmizr

Member Since 10 years ago

Experience Points
6
follower
Lessons Completed
17
follow
Lessons Completed
140
stars
Best Reply Awards
51
repos

21 contributions in the last year

Pinned
⚡ Coding starts here
⚡ An in-browser JavaScript variable dumper, similar in functionality to ColdFusion's cfdump tag.
⚡ Sample application built with Backbone.js, Twitter Bootstrap, Node.js, Express, MongoDB
⚡ Express.js Todo App
⚡ Backbone.js + Express.js single page application boilerplate
Activity
Jan
3
3 weeks ago
Activity icon
issue

orenmizr issue comment pmndrs/zustand

orenmizr
orenmizr

Correct approach to get derived values from state

Hello,

In my store, I have several methods that calculates same derived values from state. I am looking for an optimized way to achive that.

Right now, I can do this:

getDerivedValue: () => {
  return get().listA[get().indexB].value;
}
...
get().getDerivedValue();

But I prefer something like this:

get derivedValue () {
  return get().listA[get().indexB].value;
}
...
get().derivedValue;

Unfortunately, using getter gives only the inital state, returning value doesn't update with state changes. My computations are not that expensive, but it would be much better to access the value as it was a variable then calling it as a function. My concern is a bit aesthetic but anyway, it would be nice to have something like Mobx's computed property. Is there a workaround for using getter or could you provide an alternative to achieve this?

Thank you.

orenmizr
orenmizr

@dsacramone the derived state is not being cached it would seem. always calculated. (correct me if i'm mistaken) not sure if the middleware plugin caches but the code looks less coherent than @dsacramone's.

Nov
21
2 months ago
started
started time in 2 months ago
Nov
14
2 months ago
started
started time in 2 months ago
started
started time in 2 months ago
Nov
5
2 months ago
Activity icon
issue

orenmizr issue comment ElemeFE/element

orenmizr
orenmizr

[Feature Request] Table rendering is too slow when 1000 records (hopefully you can support scrolling according to scroll bars)

Existing Component

Component Name

table

Description

背景:由于业务限制,用户希望直接用滚动条就能滚动所有数据。 现状:在1000条记录的情况下,表格基本卡死,操作卡顿很厉害;自己尝试通过滚动事件解决,但是由于滚动条是在表格内部,所以很难处理。 期望:可以根据总的记录条数做一下滚动加载,目前应该有不少类似的方案可以参考。 目前我们项目完全基于element UI来做的,各方面都很好用,只是目前遇到的这个问题比较严重,会影响到产品的交付。 期望能得到回复吧,谢谢。

orenmizr
orenmizr

anything about his virtual scroll in element plus for vue3 ?