TILs - Fueling Curiosity, One Insight at a Time

At Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.

Published
Author
user-image
Emil
If you have a dimple, it's a muscle atrophy - basically your muscle doesn't work
Published
Author
user-image
Harshwardhan
Use AbortController to cancel the promise.
/code
const controller = new AbortController();
const signal = controller.signal;
// pass this signal as option in your fetch request
fetch(url, {signal}).then(...).catch(...)

// now you can reject the above promise by calling abort like this
signal.abort()

//promise will get rejected with error "AbortError"
Published
Author
user-image
Mrinmoy
rendering templates outside of controller "SomeController.render :index, formats: :csv, locals: { users: users }"
Published
Author
user-image
Revath
Never Wrap a component with HOC inside the render method. This will cause numerous unmount and mount of same component on each render.
Published
Author
user-image
Atul
Vim tip - Hitting g Ctrl-g will show you some tech info about the current file, like number of words or how many bytes it has
-- Col 1 of 25; Line 184 of 184; Word 471 of 472; Byte 4266 of 4291
Published
Author
user-image
Atul
In ssh url git@github.com:code-mancers/engineering-blog.git git is the user on github.com server. Even ssh://code-mancers@github.com/engineering-blog.git is a valid git url since git tries to clone it but since there is no code-mancers user on github hence git is not able to clone it.

Showing 71 to 73 of 82 results

Ready to Build Something Amazing?

Codemancers can bring your vision to life and help you achieve your goals