665 karma · joined March 2, 2010
But of course, as Meta put gun to the head of everyone - you WILL make Reels, or else - and now all the people I follow, increasingly make Reels. I hate Reels.
We’re an ecommerce marketing automation platform that’s generated more than $2 billion in revenue for our customers since 2018, and we’re only getting smarter and better at what we do: help independent retail thrive.
We’re looking for a frontend engineer that knows Javascript very well for Drip Onsite Team. We write lots of Vanilla Javascript that should not affect our customer’s performance or functionality, no matter how good or bad their website is made. Also, many of our customers do not know how to code, so we’ve built a flexible yet easy-to-use HTML editor to help them make their campaigns. In short, we get to solve some pretty technical problems for a lot of non-technical users.
Specifically, we’re looking for someone who is not primarily a framework user but who likes to tinker with problems no one has discovered before. Pragmatic, not politician. Can ask questions and give answers.
Apply here: https://www.drip.com/careers/dfd748af-c99a-40be-95e8-b06ec3c...
We’re a growing, stable company that creates tools that help websites turn their visitors into customers with popups. We are the good guys, as unobtrusive as possible. We are the most expensive, and our customers love us.
We’re looking for a frontend engineer that knows javascript very well since we have to write vanilla javascript that doesn’t affect our customer’s performance or functionality, no matter how good or bad their website is coded. Also, many of our customers do not know how to code, so we’ve built a flexible yet easy-to-use HTML editor to help them make their campaigns. In short, we get to solve some pretty technical problems for a lot of non-technical users.
Specifically, we’re looking for someone who is not primarily a framework user but who likes to tinker with problems no one has discovered before. Pragmatic, not politician. Can ask questions and give answers. We have multiple nationalities at Sleeknote and many work remotely.
P.S. We do not use React, nor Typescript directly, but we are inspired some of the ideas.
Apply here: https://sleeknote.com/careers/frontend-engineer
I am not mocking you, but here the case is that people do not know what true mobility for laptops is, that they literally can leave power brick behind, not to think about whether the battery lasts or not and use it freely during the day everywhere. This has been impossible until now, there has always been the constraint of do I really need to open my laptop, what if it dies, where is the power plug. As soon as masses realize that this is now no worry, everyone wants and needs 15+ hours battery life.
But yes, there are lots of implementors around and very few developers. We currently try to hire a developer and that is not easy.
Your comment is fully correct, but I would like to point out:
- with such a tiny DOM to rerender, it is equivalent, probably even faster
- custom element encapsulates DOM and it is fairly trivial and extremely fast to pick DOM (like you can even use id's everywhere) in the 'old jquery' way, with simple library functions
- updating DOM with simple render() call is way more elegant, but if you keep custom elements DOM small (and one should), this way is not that bad at all
Like this:
<!doctype html>
<body>
<custom-element></custom-element>
<script>
const CHECKBOX_ID = "my-checkbox";
const defaultLabelContent = "Toggle me, you newbies";
const beforeDiscountText = "You have not availabled discount";
const afterDiscountText = "Discount Availed!";
const beforeLabelText = "Click on me to remove fake discount"
const afterLabelText = "Click me to apply fake discount!"
const state = new WeakMap();
// 'library' code
function qs(selector) {
return this.shadowRoot.querySelector(selector);
}
function getElem(nodeOrSelector) {
return nodeOrSelector === String(nodeOrSelector) ? qs.call(this, nodeOrSelector) : nodeOrSelector;
}
function replaceText(nodeOrSelector, text) {
let elem = getElem.call(this, nodeOrSelector);
if (elem) elem.textContent = text;
}
function updateAttribute(nodeOrSelector, name, value = '') {
let elem = getElem.call(this, nodeOrSelector);
if (elem) elem[(value ? 'set' : 'remove') + 'Attribute'](name, value);
}
// end of 'library' code
class CustomElement extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<input type="checkbox" id=${CHECKBOX_ID}>
<label for=${CHECKBOX_ID}></label>
<div></div>
`;
this.shadowRoot.addEventListener('change', (event) => {
state.set(this, event.target.checked);
this.update();
})
this.update();
}
update() {
let isChecked = state.get(this);
updateAttribute.call(this, 'input', 'checked', isChecked);
replaceText.call(this, 'label', isChecked ? beforeLabelText : afterLabelText);
replaceText.call(this, 'div', isChecked ? afterDiscountText : beforeDiscountText);
}
}
customElements.define('custom-element', CustomElement);
</script> <!doctype html>
<body>
<custom-element></custom-element>
<script>
const CHECKBOX_ID = "my-checkbox";
const defaultLabelContent = "Toggle me, you newbies";
const beforeDiscountText = "You have not availabled discount";
const afterDiscountText = "Discount Availed!";
const beforeLabelText = "Click on me to remove fake discount"
const afterLabelText = "Click me to apply fake discount!"
const state = new WeakMap();
class CustomElement extends HTMLElement {
connectedCallback() {
this.render();
this.shadowRoot.addEventListener('change', (event) => {
state.set(this, event.target.checked);
this.render();
})
}
constructor() {
super();
this.attachShadow({ mode: 'open' });
}
render() {
let isChecked = state.get(this);
const discountText = isChecked
? afterDiscountText
: beforeDiscountText;
const labelText = isChecked
? beforeLabelText
: afterLabelText;
this.shadowRoot.innerHTML = `
<input
${isChecked ? 'checked ' : ''}
type="checkbox"
id=${CHECKBOX_ID}
>
<label for=${CHECKBOX_ID}>
${labelText}
</label>
<div>${discountText}</div>
`;
}
}
customElements.define('custom-element', CustomElement);
</script> /* "custom" */
[class*="as-oil"]:not(body, html),
[class*="optanon"]:not(body, html),
/* "generic" */
[class*="consent"]:not(body, html),
[id*="consent"],
[class*="gdpr"]:not(body, html),
[id*="gdpr"],
[class*="announcement"]:not(body, html),
[id*="announcement"],
[class*="policy"]:not(body, html),
[id*="policy"],
[class*="cookie"]:not(body, html),
[id*="cookie"] {
display: none!important;
visibility: hidden!important;
transform: scale(0)!important;
opacity: 0!important;
width: 0!important;
height: 0!important;
z-index: -1!important;
background: transparent!important;
color: transparent!important;
font-size:0!important;
}If you are curious, please post some real life real working code where in your mind usage of === is absolutely needed and I try my best to explain how I would tackle that with ==.
I may be just silly, but Brexit hasn't happened yet.