Remove link
article thumbnail

Designing Better Links For Websites And Emails: A Guideline

Smashing Magazine

Designing Better Links For Websites And Emails: A Guideline. Designing Better Links For Websites And Emails: A Guideline. Why are “click here” and “by this link” poor choices? Check the equipment policy by the link. Meaningful Links. Download Links. Links vs. Buttons. Link-Rich Texts.

Website 141
article thumbnail

React Children And Iteration Methods

Smashing Magazine

In this article, we’ll look at a React utility React.Children.toArray which lets us prepare the children prop for inspection and iteration, some of its shortcomings and how to overcome them — through a small open-source package, to keep our React code function the way it is deterministically supposed to behave, keeping performance intact.

Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Cookieless Alternative To Embed HTML, CSS And JS Code Snippets

Smashing Magazine

Cookieless Alternative To Embed HTML, CSS And JS Code Snippets. Cookieless Alternative To Embed HTML, CSS And JS Code Snippets. At the same time, we want to have an interactive website with comments, polls, videos, code examples, and many more. Deploy the code example with your favorite hosting provider (e.g. Get Started.

Code 109
article thumbnail

A New Way To Reduce Font Loading Impact: CSS Font Descriptors

Smashing Magazine

Smashing Magazine, like most publishers, makes use of web fonts and the below screenshot shows the difference between the initial render (with the fallback fonts), and the final render (with the web fonts): Smashing Magazine article with fallback font and with full web fonts. Large preview ). Large preview ).

article thumbnail

How To Protect Your API Key In Production With Next.js API Route

Smashing Magazine

It saves you the stress of hard hard-coding your independent routes. function MyApp({ Component, pageProps }) { return ( <React.Fragment> <Head> <meta name="theme-color" content="#73e2a7" /> <link rel="icon" type="image/ico" href="" /> </Head> <Component {.pageProps} index.js.

Servers 130
article thumbnail

Creating A Magento PWA: Customizing Themes vs. Coding From Scratch

Smashing Magazine

Creating A Magento PWA: Customizing Themes vs. Coding From Scratch. Creating A Magento PWA: Customizing Themes vs. Coding From Scratch. One of the reasons for that is because a PWA has the same code base. So unlike the case with native applications, the progressive web app needs to be coded only once. Alex Husar.

Code 74
article thumbnail

Next.js Wildcard Subdomains

Smashing Magazine

In code, that looks like this: export async function getServerSideProps(context) { let wildcard = context.req.headers.host.split(".")[0]; Here’s how that code looks like: // useEffect and useState must be imported from 'react' const [wildcard, setWildcard] = useState("") useEffect(() => { setWildcard(window.location.hostname.split(".")[0])

Servers 83