Pavel Martynov

Results 52 comments of Pavel Martynov

If your intent is to perform some setup on component first render, you can isolate this block of code by some local flag. However there is still no need to...

Do you want to fetch data each time component rerendered? If you need it on demand it can be: ```javascript const App = component(c => { let isLoading = false;...

Child components will rerender whenever parent rerendered or they are invalidated themselves. The only exception that if you give it the same properties as in previous render, it will not...

From what I understand you need to wrap parts of the original string into some html element. So basically you need to split the string into parts and map them...

@Dan-Do the problem is most probably that you assign an object to the `error` and then rendering it inside `div.alert`. Library does not support rendering objects, so try to convert...

@Dan-Do yes, when assigning `null` or `undefined` to native element attribute, library performs removal of the HTML attribute from the element. And in this case, removal of `value` attribute of...

@Dan-Do no, currently lib does not have hook for after mounting and does not have refs to work with native elements. I'm planning to implement it. But given that render...

@Dan-Do yes, I already put example snippet in my previous comment. To expand it further: ```javascript const App = component((c) => { let isRendered = false; let firstRun = true;...

But again, to perfectly integrate third-party vanillaJS libs with 1more, it lacks abovementioned functionality of refs and mount hooks. And I'm not sure is there real need to use ClipboardJS,...

Or maybe not so straightforward, but still smaller and more portable than separate lib: https://www.30secondsofcode.org/js/s/copy-to-clipboard This website has lot of useful snippets for everyday. That lib is 3.3Kb min+gzip because...