Skip to content

Instantly share code, notes, and snippets.

View Visible-Radio's full-sized avatar

Patrick Kaipainen Visible-Radio

View GitHub Profile
@Visible-Radio
Visible-Radio / FormReInitWithKey.tsx
Created December 4, 2022 21:01
Re-initialize form component's internally managed state using key prop
import { useState } from "react";
export default function FormWithKey() {
const [childKey, setChildKey] = useState(1);
return (
<div style={{ display: "flex", gap: "0.5rem", flexDirection: "column" }}>
<button onClick={() => setChildKey(prev => prev * -1)}>
Reset child by changing child Key
</button>
@Visible-Radio
Visible-Radio / CSS_skull.html
Created October 5, 2020 21:37
CSS battle skull
<!--
CSS Battle skull drawing.
linked to CSS battle from ZTM
watched tutorial at youtube link.
https://cssbattle.dev/play/4
https://www.youtube.com/watch?v=acNZ5RUzxdU&ab_channel=GalGur
-->
<style>
body {
@Visible-Radio
Visible-Radio / 14-segment-display-print-out-text.markdown
Created September 28, 2020 20:01
14 segment display print out text