If you get a type error from react-beautiful-dnd and have to fix it when you raise it to React18, you can solve it by wrapping it in styled-components and typedefing it.
const LibButton = styled(Lib.Button)<{children: React.ReactNode}>''
const DnDDroppable = styled(DnD.Droppable)<{children: (provided: DnD.Droppable Provided, snapshot:DnD.DroppableStateSnapshot) => React.ReactElement<HTMLElement, string | React.JSXElementConstructor<any>>}>''
const DnDDraggable = styled(DnD.Draggable)<{index: number, draggableld: string, children: (provided: DnD.DraggableProvided, snapshot: DnD.DraggableStateSnapshot) => React. ReactElement>}>''
先日基調講演をした経験から本番に向けてどのように考えていたか、行動していたか、メンタル面の管理はどうしていたか、等、次にはさらに良くなるように記録しておく
- 最小公倍数(lcm)は二つの数を掛けて最大公約数(gcd)で割る
// 最小公倍数
let lcm = function () {
let args = [...arguments]
if(args.length === 0) return 1
if(args.filter(e => e !== 0).length === 0) return 0
return args.reduce((a, c, i) => {
return (a * c) / gcd(a, c)
※こちらはメモ書き程度の殴り書き記事です
index
- connected-react-routerを使っている場合修正(error TypeError: Cannot read properties of undefined (reading 'pathname') at Router (index.js:194))
"use strict";
const modal = document.getElementById("js-modal");
const modalWrapper = document.getElementById("js-modalWrapper");
const checkbox = document.getElementById("js-checkbox");
const closeButton = document.getElementById("js-close");
const form = document.getElementById("js-form");
const term = document.getElementById("js-term");
Windows just released the windows subsystem for linux feature to the public with its latest windows fall creator update, if you are not familiar with this feature it allows you to run linux binaries natively on windows - F.A.Q.
The feature is not enabled by default and you need to activate it, you can do it via powershell (with admin rights):
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ref](https://gist.github.com/noygal/6b7b1796a92d70e24e35f94b53722219) | |
# Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL) | |
Windows just released the [windows subsystem for linux](https://msdn.microsoft.com/en-us/commandline/wsl/about) feature to the public with its latest windows fall creator update, if you are not familiar with this feature it allows you to run linux binaries natively on windows - [F.A.Q](https://msdn.microsoft.com/en-us/commandline/wsl/faq). | |
## Enabling WSL | |
The feature is not enabled by default and you need to activate it, you can do it via powershell (with admin rights): |
NewerOlder