Echo JS 0.11.0

<~>

kornflexx comments

kornflexx 2044 days ago. link 1 point
They will not gain user by attacking other solution. They need to have good APIs. Yet, there are mutations everywhere and no JSX (like) support. As a React user I have no temptation in using Svelte.
kornflexx 2049 days ago. link 1 point
Cool but a bit slow on mobile compared to react-virtualized.
kornflexx 2104 days ago. link 5 points
I am pretty sure you have creating multiple accounts to upvote this post...
kornflexx 2119 days ago. link 1 point
It is ok for a small app to call http method directly in a component method. But, for production, you usually pass this kind of function by props.
kornflexx 2125 days ago. link 1 point
You are an heretic, don't do that, use middleware.
kornflexx 2126 days ago. link 3 points
I don't think there is good solution against spamming. You can block up address of spammer but they will use VPN or proxy.
You can filter url but they will use link shortener. You can use captcha, but it won't stop human. You can blacklist some words in title (like crypto) but it can possibly interfere with real code article.
kornflexx 2126 days ago. link 1 point
Changing props of children without any visual information (like a renderProps pattern or a custom hook) can be bad if you work in team.
You should really consider removing magic from your lib.
kornflexx 2169 days ago. link 1 point
As an utility function you have to make it faster as possible, the array prototype that you are using are much slower than "low level" iterators.

this: Object.keys(option).forEach
should be: for (const key in option)

You are coupling your lib with React (only by the name), but it can be used outside react.

The strangest thing on your lib is that:
getClass({
  [1 + 2 === 3]: ['apple', 'pie']
}) // output -> 'apple'

Use a boolean as an object key is a bad practice: you can't use two conditions key/value.

getClass({
  [1 + 2 === 3]: ['apple', 'pie'],
  [1 + 2 === 3]: ['sand', 'earth']
}) // output -> 'sand'

You have to use two objects to make it works.
[more]