Saturday, 21 February 2026

React Windowing or List virtualization - React App optimization

 Windowing or List virtualization is a concept of only rendering or write the visible portion in the current “ window ” to the DOM. The number of items that rendered at first time are smaller than the original one.

The remaining items are rendered when you scroll down to it. The DOM nodes of items that exit the window are replaced by the new ones. This improves the performance of rendering a large list.


import React, { useState } from "react";
import ReactDOM from "react-dom";
import range from "lodash/range";

import "./styles.css";

function App() {
  const [render, setRender] = useState(false);
  const [itemCount, setItemCount] = useState(10000);

  return (
    <div>
      <h1>
        Render simple <code>{"<div />s"}</code>
      </h1>

      <div>
        Item count:{" "}
        <input
          type="number"
          value={itemCount}
          onChange={({ target: { value } }) => {
            setItemCount(value);
            setRender(false);
          }}
        />
      </div>
      <p>Notice the time it takes for the first loading</p>
      <button onClick={() => setRender(true)}>Render</button>
      <button onClick={() => setRender(false)}>Clear</button>

      <div>
        {render && range(itemCount).map(i => <div key={i}>Item {i}</div>)}
      </div>
    </div>
  );
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

Wednesday, 18 February 2026

mysql to mariadb: unknown collation utf8mb4_0900_ai_ci

 57

I have a mysql 8.0 that I exported using mysqldump. I am trying to import it onto a Mariadb 10.4 database with phpmyadmin, both are the most current versions. Each time I do it though, I get:

Error: Unknown collation utf8mb4_0900_ai_ci

Then I went back into the sql file and replaced utf8mb4_0900_ai_ci with utf8mb4_general_ci, but then it says there are errors with various CREATE VIEW sql statements. Are there any other quick, error free fixes I can try?

React Windowing or List virtualization - React App optimization

  Windowing  or   List virtualization   is a concept of only rendering or write the visible portion in the current   “ window ”   to the   D...