Jen C.

Jen C. @jenchen

About: Front-End Engineer passionate about full-stack development

Joined:
Jun 4, 2023

Jen C.
articles - 42 total

Security - Solving the "Content Security Policy (CSP) Header Not Set": style-src

Resources Content-Security-Policy: default-src directive Content-Security-Policy:...

Learn More 0 0Jun 19

Security - Solving the "Content Security Policy (CSP) Header Not Set": frame-ancestors directive and frame-src directive

Resources Content-Security-Policy: frame-ancestors directive Content-Security-Policy:...

Learn More 1 1Jun 17

Security - Solving the "Content Security Policy (CSP) Header Not Set" in Next.js: script-src and connect-src

Resources @next/react-refresh-utils What is React Fast Refresh? Content-Security-Policy:...

Learn More 1 0Jun 16

JavaScript package manager - How to upgrade a package and its indirect dependencies using Yarn 1.x

Resources Trivy How npm Works Managing dependencies yarn upgrade yarn why Selective...

Learn More 0 1Jun 12

JavaScript package manager - How to fix Cannot find module 'cheerio' error with Enzyme in Yarn 1 projects

Resources Yarn 1 Selective dependency resolutions Jest jsdom Enzyme Babel ...

Learn More 0 0Jun 12

Security - Solving the "Content Security Policy (CSP) Header Not Set" in Next.js

Resources Zed Attack Proxy (ZAP) How to set a Content Security Policy (CSP) for your...

Learn More 1 0May 28

Jest - How to verify that an element does not exist in the rendered output

Resources Types of...

Learn More 0 0May 21

Jest - Testing with React and React Testing Library: Useful APIs

Resources react-testing-library API Firing Events waitFor About Queries Document:...

Learn More 11 5May 21

Optimize Core Web Vitals - FCP and LCP: Handle Offscreen <iframe> (3) - Use memo, startTransition, and setTimeout

Pre-study startTransition memo Window: setTimeout() method &lt;iframe&gt;: The Inline...

Learn More 0 0May 19

Jest - Mocking Next.js Image to handle dynamic properties in tests

Pre-study Next.js - Image Component Importing images used the 'import' keyword for the...

Learn More 0 0May 5

Jest - Solution for "Jest encountered an unexpected token"

Pre-study Compiling Vs. Transpiling Jest Code Transformation Jest docs –...

Learn More 0 0May 5

JavaScript – The Boundary of Date

Resource MDN Date Date objects encapsulate an integral number that represents...

Learn More 0 0May 1

Core Web Vitals: How I Improved FCP by 75% and LCP by 50% on a Real-World Website

Big Win: 75% Faster FCP, 50% Faster LCP Final Results: Before and After (Average of 10...

Learn More 1 0Apr 23

Switching Next.js Compiler from Babel to SWC

Resources Next.js Compiler SWC disabled Why you should use SWC (and not Babel) Why You...

Learn More 0 0Apr 23

Optimize Core Web Vitals - FCP and LCP: Lazy-Loading Offscreen <iframe> (2)

Pre-study &lt;iframe&gt;: The Inline Frame element Window: load event AbortController ...

Learn More 0 0Apr 17

Detect and fix vulnerabilities (CVE) & misconfigurations (IaC) for your web application

Resources Trivy OWASP Web Application Security Step-by-step guide (identify the...

Learn More 0 0Apr 1

Optimize Core Web Vitals - FCP and LCP: Images

Pre-study Resources Serve images in next-gen formats Next.js Image...

Learn More 1 0Mar 27

Optimize Core Web Vitals - FCP and LCP: Optimize bundle size by lazy loading heavy 3rd-party package

Resources https://nextjs.org/docs/pages/building-your-application/optimizing ...

Learn More 0 0Mar 27

Optimize Core Web Vitals - FCP and LCP: Tree-shaking Lodash

Resources What is...

Learn More 0 1Mar 27

Optimize Core Web Vitals - FCP and LCP: Remove not need dependencies

Optimize Core Web Vitals - FCP and LCP: Remove not need dependencies Check if any...

Learn More 0 0Mar 27

Optimize Core Web Vitals - FCP and LCP: Render-blocking resources

Resources Network panel: Analyze network load and...

Learn More 1 0Mar 27

Django REST Framework with Simple JWT (JSON Web Token): Steps on how to sign and verify using the RSA algorithm

Prerequisites Before getting started, ensure you have completed the setup for Simple...

Learn More 0 0Mar 22

Optimize Core Web Vitals - FCP and LCP: Lazy-Loading Offscreen <iframe>

Pre-study It's time to lazy-load offscreen iframes! display: none iframe#lazy ...

Learn More 0 0Mar 18

Build and Deploy a Monorepo WebSocket web application with Turbo, Express, and Vite on Render Using Docker

Introduction Tip: This post only focuses on the build and deployment phase, and the...

Learn More 1 0Dec 31 '24

Efficiently Extract Nested URL Parameters with Recursive Logic in JavaScript

Scenario Extract the value of a target search parameter (e.g., id) from a nested URL...

Learn More 0 0Dec 26 '24

React - Create a custom hook to handle online and offline events by using AbortController and addEventListener

Using AbortController vs removeEventListener Using AbortController import { useEffect }...

Learn More 1 2Dec 24 '24

CSS - display: flex vs inline-flex

inline-flex A child container with display: inline-flex does not automatically fill the...

Learn More 2 1Nov 22 '24

How to Perform Actions After an Image Loads in React: Using the onLoad Event or the complete Property

The load event triggered by an HTML element does not bubble up to the window object by default....

Learn More 1 0Nov 12 '24

Using Zod's z.union: An Important Pitfall to Avoid

When using the schema z.union([z.object({}), anotherSchema.partial()]);, Zod checks if the object...

Learn More 3 0Nov 7 '24

How to Fix Common ESLint Errors: Troubleshooting Unknown or Strange Issues

When get the error by running npm run lint -w myFolder Enter fullscreen mode ...

Learn More 0 0Nov 7 '24