Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 18 11:44
    pakastin commented #442
  • May 18 11:40
    prakashraman commented #442
  • May 18 11:39
    prakashraman commented #442
  • May 18 11:33
    pakastin commented #442
  • May 18 11:33
    pakastin closed #442
  • May 18 11:33
    pakastin commented #442
  • May 18 11:17
    prakashraman opened #442
  • May 06 05:48
    aarongeorge review_requested #441
  • May 06 05:48
    aarongeorge opened #441
  • Apr 30 13:03
    neerajkanhere commented #339
  • Apr 29 03:09
    dependabot[bot] labeled #440
  • Apr 29 03:09
    dependabot[bot] opened #440
  • Apr 29 03:09
    dependabot[bot] review_requested #440
  • Apr 29 03:09

    dependabot[bot] on npm_and_yarn

    Bump async from 2.6.3 to 2.6.4 … (compare)

  • Apr 14 06:13
    pakastin commented #439
  • Apr 14 06:12

    pakastin on gh-pages

    Updates (compare)

  • Apr 14 06:12

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 14 06:12
    dependabot[bot] closed #435
  • Apr 14 06:12
    dependabot[bot] edited #435
  • Apr 14 06:12
    dependabot[bot] commented #435
Mikko Ahlroth
@Nicd
so in the end I don't need the feature anyway :P
I thought I could hide DOM elements with CSS Grid template-areas, but it doesn't work that way
Juha Lindstedt
@pakastin
I've thought about that (multiple elements inside this.el), but let's see..
nawfalhasan
@nawfalhasan
I am totally new to web development. Was doing some basic internet research on js frameworks to choose from. It's a hobby project, so I can expermint. Have a question on redom
Is it suitable for SPA? Redom looks pretty basic view library and I am not sure if it gives my application an architecture. Also, what about routing, state management etc in redom?
Juha Lindstedt
@pakastin
I’ve used RE:DOM to create the whole iDiD digital signage system (idid.fi, idid2.fi), which is single page application
So yeah, it’s very well suited for that purpose as well 🙂
I use it so that I build component hierarchy, where I pass api along. Then I use that to trigger updates to the state.
I also have a requestAnimationFrame throttle, but that’s not required
But you can use whatever state management you like
I used to use native DOM events, that was also good
Components have constructor and update methods, so that you can efficiently update the state, usually even no diffing needed, since browser keeps care of that
Juha Lindstedt
@pakastin
lists, router and places are good tools to use, too
router is basically a view router, but it’s easy to use with push state or hashes:
const path = location.hash.slice(1).split(’/’);
// i.e. #/info –> [’’, ’info’]

router.update(path[1], state); // ’info’, state
Juha Lindstedt
@pakastin
It’s almost identical to use pushstate..
nawfalhasan
@nawfalhasan
@pakastin thanks, though I dont follow all that technical stuff you say. I am just starting on this whole front-end stuff
Juha Lindstedt
@pakastin
I should make an example app..
nawfalhasan
@nawfalhasan
Yup :)
Mikko Ahlroth
@Nicd
congrats on the 10000 stars! :star: ;)
my service pivoted into the cryptocurrency world: https://twitter.com/code_stats/status/980374287713492993
Juha Lindstedt
@pakastin
Mikko, it’s April 1st 😉
Oh, haha didn’t check out your link first 😄
That’s good one! 😄
White paper is REALLY white 😂👍
Mikko Ahlroth
@Nicd
btw RE:DOM Chrome devtools extension works again in Vivaldi \o/
Juha Lindstedt
@pakastin
👍👍
Mikko Ahlroth
@Nicd
damn I'm doing this.data[sent_at_local.month - 1]['days'][sent_at_local.day].xp += new_xp;
so this.data is a list of objects which have days key that is a list of days which have xp key that I'm updating
and RE:DOM updates a table I render based on that automatically
how does it detect the change? or does it rerender on every update call?
like the whole table
Juha Lindstedt
@pakastin
It detects new items, reordered items and removed items
And calls update on every item yeah
But don’t worry, most of the DOM updates will just be skipped natively if unchanged
I mean textContent, classList.add/remove etc, ...
Mikko Ahlroth
@Nicd
so I guess in my case it's rendering every TD?
Juha Lindstedt
@pakastin
Yeah, but usually it’s ok and super fast
Mikko Ahlroth
@Nicd
yeah :) also it's not a big table
Juha Lindstedt
@pakastin
You can use Chrome dev tools to see purple flashes
Mikko Ahlroth
@Nicd
I just didn't expect it to work right away :D
good idea
Juha Lindstedt
@pakastin
It’s actually usually faster than for example virtual dom or some other diffing, since DOM is native and that way ”blazing fast” 🙂
Mikko Ahlroth
@Nicd
Screen Shot 2018-04-06 at 22.30.19.png
what I just made
Juha Lindstedt
@pakastin
And even if you diff the changed, DOM would also make another diffing
So with RE:DOM you actually save an extra diffing..
However in your case it could be faster to update without the key..
Then it just inserts/removes based on index
Mikko Ahlroth
@Nicd
don't understand that part about the key. but I checked with devtools and at least any extra paints are avoided, it just paints the changed cell if it changed
Mikko Ahlroth
@Nicd
does RE:DOM remember the data last sent to update?