Tim's Blog

Creating React components

Class components import React from 'react' export default class HelloWorld extends React.Component { render() { return <h1>Hello world!</h1>; } } Functional components import React from 'react' export default function HelloWorld(){ return <h1>Hello world!</h1> }

How to setup Redux in a React project

Installing Redux: npm install @reduxjs/toolkit react-redux Create a src/store folder. We will create a numeric counter in our state, Redux calls this a “slice” of the state. To create our slice, create src/store/counter.jsx . Each slice should live in a file similar to this one. // src/

How to setup routing in React with React Router

First step is to create a new React project. Check out how to do it here: How to create React app with ViteIn your terminal: npm create vite@latest You will be prompted by the setup, choose a project name eg. myApp, and choose React from the list of frameworks.

How to create React app with Vite

In your terminal: npm create vite@latest You will be prompted by the setup, choose a project name eg. myApp, and choose React from the list of frameworks. Then jump in and start developing: cd myApp npm install # start development server npm run dev

How to setup a OpenVPN server

Download install script wget <https://git.io/vpn> -O openvpn-install.shwget <https://git.io/vpn> -O openvpn-install.sh Execute the script sudo chmod +x openvpn-install.sh sudo bash openvpn-install.sh At this point you will be prompted to choose either UDP or TCP in protocol options,

Tim's Blog © 2026