Skip to content

Instantly share code, notes, and snippets.

View sibasishm's full-sized avatar
🐢
Solving problems one day at a time

Sibasish Mohanty sibasishm

🐢
Solving problems one day at a time
View GitHub Profile
@mxstbr
mxstbr / en.js
Created September 12, 2020 07:28
We need your help to translate the https://feedback.fish widget into more languages! If you know a language, please help by posting a translation for these strings in a comment below.
const en = {
titles: {
default: `What's on your mind?`,
idea: `Share an idea`,
issue: `Report an issue`,
other: `Tell us anything!`,
},
categories: {
idea: `Idea`,
issue: `Issue`,
@gaearon
gaearon / uselayouteffect-ssr.md
Last active April 24, 2024 18:42
useLayoutEffect and server rendering

If you use server rendering, keep in mind that neither useLayoutEffect nor useEffect can run until the JavaScript is downloaded.

You might see a warning if you try to useLayoutEffect on the server. Here's two common ways to fix it.

Option 1: Convert to useEffect

If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect instead.

function MyComponent() {
@basham
basham / css-units-best-practices.md
Last active April 18, 2024 16:44
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units