Categories
Next.js

Next.js Dynamic Routes Example

// pages/user/[id].tsx
import { useRouter } from 'next/router';

const User = () => {
  const router = useRouter();
  const { id, ...rest } = router.query;

  return (
    <>
      <h1>User Id is {id}</h1>
      <pre>{JSON.stringify(rest)}</pre>
    </>
  )
}

export default User;

Ref: EggHead

Categories
Gallery

Jump up and kick!

My favorite sport is a shuttlecock.
Categories
WordPress Block Editor

WordPress Gutenberg Breakpoints

I found an issue that collects all Gutenberg breakpoints. It will be helpful in case you wish to develop some custom components or override a CSS for a block column.

Categories
Linux Server

Fix MariaDB can’t start

I used RunCloud to manage my servers and my web application. Once we got an error with MariaDB offline cause one of a database has been crashed.

Categories
WordPress + React

Render Application with WordPress React

You don’t need to install React if you work with the WordPress environment. Like many other frameworks, WordPress release their own React-based package which helps us to use the same function and methods. In this case, @wordpress/element will be an alternative way.

Categories
React

React for Beginner: The Variable Scope

When you need to start to React development as a new skill, there is something related to variable scope you should get attended.