{"id":10948,"date":"2022-10-03T07:00:33","date_gmt":"2022-10-02T22:00:33","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10948"},"modified":"2022-09-09T18:17:17","modified_gmt":"2022-09-09T09:17:17","slug":"laravel-react-%e3%81%a7%e3%82%bd%e3%83%95%e3%83%88%e3%82%a6%e3%82%a7%e3%82%a2%e3%82%ad%e3%83%bc%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10948","title":{"rendered":"Laravel + React \u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001<code>Laravel<\/code>\u306b\u6a19\u6e96\u642d\u8f09\u3055\u308c\u305f<code>Vite<\/code>\u3092\u304d\u3063\u304b\u3051\u3068\u3057\u3066\u3001\u6700\u8fd1<code>React<\/code>\u3092\u3088\u304f\u4f7f\u3046\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u304c\u3001\u6614\u89e6\u3063\u3066\u307f\u305f\u3068\u304d\u3068\u9055\u3044\u3068\u3066\u3082\u597d\u611f\u89e6\u3067\u3059\ud83d\ude04<\/p>\n<p>\u305d\u3057\u3066\u3001<code>React<\/code>\u3092\u4f7f\u3063\u305f\u300c<strong>\u30e6\u30fc\u30b6\u30d3\u30ea\u30c6\u30a3<\/strong>\u300d\u95a2\u9023\u306e\u4f55\u304b\u3092\u3064\u304f\u3063\u3066\u3044\u305f\u3068\u304d\u306b\u3042\u308b\u30a2\u30a4\u30c7\u30a2\u304c\u6d6e\u304b\u3073\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3068\u306f\u3001\u30da\u30fc\u30b8\u5185\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u8868\u793a\u3057\u30af\u30ea\u30c3\u30af\u3057\u3066\u3082\u3089\u3046\u3053\u3068\u3067\u6587\u5b57\u3084\u6570\u5b57\u3092\u5165\u529b\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002\uff08\u30cd\u30c3\u30c8\u9280\u884c\u306e\u30ed\u30b0\u30a4\u30f3\u306b\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3088\u306d\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10963\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_13.png\" alt=\"\" width=\"359\" height=\"286\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_13.png 359w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_13-300x239.png 300w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u904e\u53bb\u306b\u3054\u4f9d\u983c\u3044\u305f\u3060\u3044\u305f\u4f5c\u696d\u3067\u300c<strong>\u4fbf\u5229\u304b\u306a\uff1f<\/strong>\u300d\u3068\u601d\u3044\u3001\u3053\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u305f\u3068\u3053\u308d\u3001\u5927\u5909\u8912\u3081\u3066\u3044\u305f\u3060\u3044\u305f\u7d4c\u9a13\u304c\u3042\u308a\u307e\u3059\u3002\uff08\u30de\u30a6\u30b9 \u2194 \u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u884c\u304d\u6765\u304c\u306a\u304f\u306a\u308b\u304b\u3089\u9762\u5012\u304f\u3055\u304c\u308a\u306e\u79c1\u306b\u3082\u30d4\u30c3\u30bf\u30ea\uff01\uff09<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u3001<code>Laravel + React<\/code>\u3067\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude00\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9809 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/11\/no_9.png\" alt=\"\" width=\"370\" height=\"220\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/11\/no_9.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/11\/no_9-300x178.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c\u5927\u962a\u3067\u300e\u96fb\u52d5\u30ad\u30c3\u30af\u30dc\u30fc\u30c9\u30fb\u30b7\u30a7\u30a2\u300f<br \/>\n\u306a\u308b\u3082\u306e\u3092\u767a\u898b\u3002<br \/>\n\u6642\u4ee3\u306f\u52d5\u3044\u3066\u307e\u3059\u306d\uff01\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 9.x\u3001Vite\u3001React\u3001Inertia.js\u3001TailwindCSS<\/p>\n<h1>\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f<code>Laravel<\/code>\u306b\u30eb\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u3072\u3068\u3064\u3060\u3051\u3067\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n<strong>Route::get('software_keyboard', fn() =&gt; Inertia::render('SoftwareKeyboard\/Index'));<\/strong><\/pre>\n<h1>\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3055\u308c\u308b\u30d3\u30e5\u30fc\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u3061\u306a\u307f\u306b\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u3067\u3059\u306e\u3067\u3001\u5165\u529b\u90e8\u5206\u306f\uff13\u3064\u4f5c\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\uff08\u3064\u307e\u308a\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\uff13\u3064\u305d\u308c\u305e\u308c\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\uff09<\/p>\n<p><strong>resources\/js\/Pages\/SoftwareKeyboard\/Index.jsx<\/strong><\/p>\n<pre>import {useEffect, useState} from 'react';\r\n<strong>import SoftwareKeyboard from '@\/Components\/SoftwareKeyboard';<\/strong>\r\n\r\nexport default function Index() {\r\n\r\n    \/\/ Data\r\n    const [number1, setNumber1] = useState('1234567890');\r\n    const [number2, setNumber2] = useState('0987654321');\r\n    const [number3, setNumber3] = useState('');\r\n\r\n    \/\/ Effect\r\n    useEffect(() =&gt; {  \/\/ \u5165\u529b\u5185\u5bb9\u304c\u5909\u66f4\u3055\u308c\u305f\u3089\u5b9f\u884c\u3055\u308c\u308b\u90e8\u5206\r\n\r\n        console.log('number1 \u2192', number1);\r\n        console.log('number2 \u2192', number2);\r\n        console.log('number3 \u2192', number3);\r\n\r\n    }, [number1, number2, number3]);\r\n\r\n    return (\r\n        &lt;div className='p-5'&gt;\r\n            &lt;h1 className=\"mb-4 font-bold\"&gt;\r\n                \u6570\u5b57\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3064\u304d\u5165\u529b\u30dc\u30c3\u30af\u30b9\r\n                &lt;small&gt;\uff08Laravel + React + inertia\uff09&lt;\/small&gt;\r\n            &lt;\/h1&gt;\r\n            &lt;div className=\"mb-3\"&gt;\r\n                <strong>&lt;SoftwareKeyboard<\/strong>\r\n<strong>                    value={number1}<\/strong>\r\n<strong>                    onChange={value =&gt; setNumber1(value)} \/&gt;<\/strong>\r\n            &lt;\/div&gt;\r\n            &lt;div className=\"mb-3\"&gt;\r\n                <strong>&lt;SoftwareKeyboard<\/strong>\r\n<strong>                    value={number2}<\/strong>\r\n<strong>                    onChange={value =&gt; setNumber2(value)} \/&gt;<\/strong>\r\n            &lt;\/div&gt;\r\n            &lt;div className=\"mb-3\"&gt;\r\n                <strong>&lt;SoftwareKeyboard<\/strong>\r\n<strong>                    value={number3}<\/strong>\r\n<strong>                    onChange={value =&gt; setNumber3(value)} \/&gt;<\/strong>\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    );\r\n\r\n}<\/pre>\n<p>\u5185\u5bb9\u3068\u3057\u3066\u306f\u3001\u3053\u308c\u304b\u3089\u3064\u304f\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\uff13\u3064\u914d\u7f6e\u3057\u3001\u305d\u306e\u5165\u529b\u5185\u5bb9\u306b\u5909\u66f4\u304c\u3042\u3063\u305f\u3089\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u4e2d\u8eab\u3092\u8868\u793a\u3059\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u4eca\u56de\u306e\u30e1\u30a4\u30f3\u306b\u306a\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u300c<strong>SoftwareKeyboard.jsx<\/strong>\u300d\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>resources\/js\/Components\/SoftwareKeyboard.jsx<\/strong><\/p>\n<pre><strong>import {useEffect, useRef, useState} from 'react';<\/strong>\r\n\r\n<strong>export default function SoftwareKeyboard(props) {<\/strong>\r\n\r\n<strong>    \/\/ Data<\/strong>\r\n<strong>    const keyboardValues = [<\/strong>\r\n<strong>        '7', '8', '9',<\/strong>\r\n<strong>        '4', '5', '6',<\/strong>\r\n<strong>        '1', '2', '3',<\/strong>\r\n<strong>        '0', '\u2190', 'C',<\/strong>\r\n<strong>    ];<\/strong>\r\n<strong>    const [showKeyboard, setShowKeyboard] = useState(false);<\/strong>\r\n<strong>    const [value, setValue] = useState(props.value);<\/strong>\r\n<strong>    const [selection, setSelection] = useState(0);<\/strong>\r\n<strong>    const [initialized, setInitialized] = useState(false);<\/strong>\r\n\r\n<strong>    \/\/ Methods<\/strong>\r\n<strong>    const handleInputChange = newValue =&gt; {<\/strong>\r\n\r\n<strong>        const inputKeyboardValues = keyboardValues.filter(keyboardValue =&gt; { \/\/ \u5165\u529b\u53ef\u80fd\u306a\u5024\u306e\u307f\u3092\u62bd\u51fa<\/strong>\r\n\r\n<strong>            const invalidValues = ['\u2190', 'C'];<\/strong>\r\n\r\n<strong>            return invalidValues.includes(keyboardValue) === false;<\/strong>\r\n\r\n<strong>        });<\/strong>\r\n<strong>        const pattern = new RegExp('^('+ inputKeyboardValues.join('|') +')*$');<\/strong>\r\n\r\n<strong>        if(pattern.test(newValue)) { \/\/ \u5165\u529b\u53ef\u80fd\u6587\u5b57\u3060\u3051\u306e\u5834\u5408<\/strong>\r\n\r\n<strong>            setValue(newValue);<\/strong>\r\n\r\n<strong>            if(typeof props.onChange === 'function') {<\/strong>\r\n\r\n<strong>                props.onChange(newValue);<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>    };<\/strong>\r\n<strong>    const handlerKeyboardClick = keyboardValue =&gt; {<\/strong>\r\n\r\n<strong>        const input = inputRef.current;<\/strong>\r\n<strong>        const selectionStart = input.selectionStart;<\/strong>\r\n<strong>        const selectionEnd = input.selectionEnd;<\/strong>\r\n<strong>        let fullValue = value.toString();<\/strong>\r\n\r\n<strong>        if(selectionStart !== selectionEnd) { \/\/ \u9078\u629e\u7bc4\u56f2\u304c\u3042\u308b\u3068\u304d\u306f\u6587\u5b57\u3092\u524a\u9664<\/strong>\r\n\r\n<strong>            fullValue = fullValue.slice(0, selectionStart) + fullValue.slice(selectionEnd);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        let beforeValue  = fullValue.slice(0, selectionStart);<\/strong>\r\n<strong>        let middleValue = '';<\/strong>\r\n<strong>        let afterValue = fullValue.slice(selectionStart);<\/strong>\r\n<strong>        let newSelection = 0;<\/strong>\r\n\r\n<strong>        if(keyboardValue === '\u2190') { \/\/ \uff11\u6587\u5b57\u524a\u9664<\/strong>\r\n\r\n<strong>            beforeValue = beforeValue.slice(0, -1);<\/strong>\r\n<strong>            newSelection = beforeValue.length;<\/strong>\r\n\r\n<strong>        } else if(keyboardValue === 'C') { \/\/ \u30af\u30ea\u30a2<\/strong>\r\n\r\n<strong>            beforeValue = '';<\/strong>\r\n<strong>            afterValue = '';<\/strong>\r\n\r\n<strong>        } else {<\/strong>\r\n\r\n<strong>            middleValue = keyboardValue;<\/strong>\r\n<strong>            newSelection = selectionStart + 1;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        setSelection(newSelection);<\/strong>\r\n\r\n<strong>        const newValue = beforeValue + middleValue + afterValue;<\/strong>\r\n<strong>        handleInputChange(newValue);<\/strong>\r\n\r\n<strong>    };<\/strong>\r\n\r\n<strong>    \/\/ Refs<\/strong>\r\n<strong>    const inputRef = useRef();<\/strong>\r\n\r\n<strong>    \/\/ Effect<\/strong>\r\n<strong>    useEffect(() =&gt; {<\/strong>\r\n\r\n<strong>        if(initialized === true) {<\/strong>\r\n\r\n<strong>            const input = inputRef.current;<\/strong>\r\n<strong>            input.focus();<\/strong>\r\n<strong>            input.setSelectionRange(selection, selection);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        setInitialized(true);<\/strong>\r\n\r\n<strong>    }, [selection]);<\/strong>\r\n\r\n<strong>    return (<\/strong>\r\n<strong>        &lt;&gt;<\/strong>\r\n\r\n<strong>            {\/* \u5165\u529b\u30dc\u30c3\u30af\u30b9 *\/}<\/strong>\r\n<strong>            &lt;input<\/strong>\r\n<strong>                type=\"text\"<\/strong>\r\n<strong>                value={value}<\/strong>\r\n<strong>                ref={inputRef}<\/strong>\r\n<strong>                onChange={e =&gt; handleInputChange(e.target.value)}<\/strong>\r\n<strong>                onFocus={() =&gt; setShowKeyboard(true)} \/&gt;<\/strong>\r\n\r\n<strong>            {\/* \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9 *\/}<\/strong>\r\n<strong>            {showKeyboard &amp;&amp; (<\/strong>\r\n<strong>                &lt;div className=\"px-3 pb-3 mt-3 bg-gray-100 w-48 border border-gray-50\"&gt;<\/strong>\r\n<strong>                    &lt;div className=\"text-right\"&gt;<\/strong>\r\n<strong>                        &lt;a href=\"#\" className=\"text-blue-500 text-xs\" onClick={() =&gt; setShowKeyboard(false)}&gt;<\/strong>\r\n<strong>                            &amp;times; &lt;small&gt;\u9589\u3058\u308b&lt;\/small&gt;<\/strong>\r\n<strong>                        &lt;\/a&gt;<\/strong>\r\n<strong>                    &lt;\/div&gt;<\/strong>\r\n<strong>                    &lt;div className=\"grid grid-cols-3 gap-3 mt-1\"&gt;<\/strong>\r\n<strong>                        {keyboardValues.map((keyboardValue, i) =&gt; (<\/strong>\r\n<strong>                            &lt;button<\/strong>\r\n<strong>                                key={i}<\/strong>\r\n<strong>                                className=\"bg-cyan-900 text-white p-1\"<\/strong>\r\n<strong>                                onClick={() =&gt; handlerKeyboardClick(keyboardValue)}&gt;<\/strong>\r\n<strong>                                {keyboardValue}<\/strong>\r\n<strong>                            &lt;\/button&gt;<\/strong>\r\n<strong>                        ))}<\/strong>\r\n<strong>                    &lt;\/div&gt;<\/strong>\r\n<strong>                &lt;\/div&gt;<\/strong>\r\n<strong>            )}<\/strong>\r\n\r\n<strong>        &lt;\/&gt;<\/strong>\r\n<strong>    );<\/strong>\r\n\r\n<strong>}<\/strong><\/pre>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306f\u30b3\u30fc\u30c9\u306f\u3053\u3053\u307e\u3067\u3067\u3059\u306e\u3067\u3001\u4e2d\u8eab\u3092\u8a73\u3057\u304f\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>Data<\/h2>\n<p>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5185\u3067\u4f7f\u3046\u30c7\u30fc\u30bf\u4e00\u89a7\u3067\u3059\u3002<br \/>\n\u4e2d\u8eab\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>keyboardValues<\/strong>\uff1a \u3053\u3053\u306e\u4e2d\u8eab\u304c\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/li>\n<li><strong>showKeyboard<\/strong>\uff1a \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u8868\u793a\uff0f\u975e\u8868\u793a\u3092\u5207\u308a\u66ff\u3048\u308b\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002<\/li>\n<li><strong>selection<\/strong>\uff1a \u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e\u4e2d\u3067\u30ab\u30fc\u30bd\u30eb\u304c\u3069\u3053\u306e\u4f4d\u7f6e\u306b\u3044\u308b\u306e\u304b\u3092\u4fdd\u6301\u3059\u308b\u5909\u6570\u3067\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10950\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_1.png\" alt=\"\" width=\"265\" height=\"75\" \/><\/p>\n<ul>\n<li><strong>initialized<\/strong>\uff1a \u30da\u30fc\u30b8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u3001\u521d\u671f\u5316\u304c\u5b8c\u4e86\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u5909\u6570\u3067\u3059\u3002<\/li>\n<\/ul>\n<h2>Methods<\/h2>\n<p>\u6b21\u306b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<br \/>\n\u4ee5\u4e0b\uff12\u3064\u306e\u30a4\u30d9\u30f3\u30c8\u7528\u30e1\u30bd\u30c3\u30c9\u3092\u7528\u610f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>handleInputChange()<\/h3>\n<p>\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e\u4e2d\u8eab\u306b\u5909\u5316\u304c\u3042\u3063\u305f\u3089\u547c\u3070\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001\u300c<strong>\u4e88\u671f\u3057\u306a\u3044\u6587\u5b57\u304c\u3042\u3063\u305f\u5834\u5408\u306f\u5165\u529b\u5185\u5bb9\u3092\u5909\u66f4\u3057\u306a\u3044\uff08\u7121\u8996\u3059\u308b\uff09<\/strong>\u300d\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u89aa\u5074\u3067<code>onChange<\/code>\u30a4\u30d9\u30f3\u30c8\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f7f\u7528\u4f8b\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;SoftwareKeyboard\r\n    value={number1}\r\n    <strong>onChange<\/strong>={value =&gt; setNumber1(value)} \/&gt;<\/pre>\n<h3>handlerKeyboardClick()<\/h3>\n<p>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30dc\u30bf\u30f3\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3068\u304d\u306b\u547c\u3070\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u3053\u306e\u4e2d\u3067\u3084\u3063\u3066\u3044\u308b\u306e\u306f\u5165\u529b\u5185\u5bb9\u306e\u300c<strong>\u9078\u629e\u7bc4\u56f2\u306e\u524a\u9664<\/strong>\u300d\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10951\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_2.png\" alt=\"\" width=\"251\" height=\"70\" \/><\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4e0a\u306e\u4f8b\u3067\u884c\u304f\u3068\u300c7\u300d\u306e\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u5834\u5408\u306f\u300c12<strong>7<\/strong>90\u300d\u3068\u306a\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u305d\u308c\u4ee5\u964d\u306f\u62bc\u3055\u308c\u305f\u30dc\u30bf\u30f3\u306b\u3088\u3063\u3066\u51e6\u7406\u3092\u5909\u3048\u3066\u3044\u307e\u3059\u3002<br \/>\n\u8a73\u3057\u3044\u5185\u5bb9\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u2190\uff1a \uff11\u6587\u5b57\u524a\u9664\u3059\u308b\uff08\u30d0\u30c3\u30af\u30b9\u30da\u30fc\u30b9\uff09<\/li>\n<li>C\uff1a \u5165\u529b\u5185\u5bb9\u3092\u3059\u3079\u3066\u30af\u30ea\u30a2<\/li>\n<li>\uff10\u301c\uff19\uff1a \u305d\u306e\u6570\u5b57\u3092\u633f\u5165\u3059\u308b<\/li>\n<\/ul>\n<p>\u305d\u306e\u4ed6\u306b\u306f\u3001\u65b0\u3057\u3044\u5165\u529b\u5185\u5bb9\u306e\u66f4\u65b0\u3084\u3001\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\u3092\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>Refs<\/h3>\n<p>\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e<code>&lt;input&gt;<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u30bb\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>Effect<\/h2>\n<p><code>handlerKeyboardClick()<\/code>\u5185\u3067<code>selection<\/code>\uff08\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\uff09\u304c\u66f4\u65b0\u3055\u308c\u308b\u3068\u5b9f\u884c\u3055\u308c\u308b\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\uff08\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u6642\u70b9\u3067\u30d5\u30a9\u30fc\u30ab\u30b9\u304c\u5916\u308c\u3066\u3044\u308b\u306e\u3067\u5143\u306b\u623b\u3057\u3066\u3044\u307e\u3059\uff09\u3001\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\u3092\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u306a\u305c<code>initialized<\/code>\u3067\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001<code>React<\/code>\u306e\u5834\u5408\u3001\u30da\u30fc\u30b8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u6642\u70b9<code>useEffect<\/code>\u304c\u5b9f\u884c\u3055\u308c\u308b\u306e\u3067\u3001\u3059\u3079\u3066\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3046\u305f\u3081\u3067\u3059\u3002\uff08<code>Vue<\/code>\u306e\u5834\u5408\u3001<code>watch<\/code>\u306b\u306f<code>immediate: true<\/code>\u3092\u30bb\u30c3\u30c8\u3057\u306a\u3044\u3068\u30da\u30fc\u30b8\u8aad\u307f\u8fbc\u307f\u6642\u306b\u306f\u5b9f\u884c\u3055\u308c\u307e\u305b\u3093\uff09<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u307e\u305a<code>Vite<\/code>\u3092\u8d77\u52d5\u3055\u305b\u3066\u304b\u3089\u300c<strong>http:\/\/******\/software_keyboard<\/strong>\u300d\u3078\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001\u8a18\u4e8b\u306e\u9014\u4e2d\u3067\u3082\u66f8\u3044\u305f\u3068\u304a\u308a\u3001\u5165\u529b\u30dc\u30c3\u30af\u30b9\u304c\uff13\u3064\u8868\u793a\u3055\u308c\u3001\u3055\u3089\u306b\u521d\u671f\u5024\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>123456789<\/li>\n<li>0987654321<\/li>\n<li>\uff08\u306a\u3057\uff09<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10952\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_3.png\" alt=\"\" width=\"537\" height=\"216\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_3.png 537w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_3-300x121.png 300w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/p>\n<p>\u3067\u306f\u3001\u307e\u305a\u306f\u4e00\u756a\u4e0a\u306e\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306b\u30ab\u30fc\u30bd\u30eb\u3092\u5408\u308f\u305b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u306a\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10953\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_4.png\" alt=\"\" width=\"260\" height=\"322\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_4.png 260w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_4-242x300.png 242w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u307e\u305a\u306f\u3001\u3046\u307e\u304f\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u306e\u72b6\u614b\u3067\u300c1\u300d\u300c2\u300d\u300c3\u300d\u3068\u9806\u306b\u30af\u30ea\u30c3\u30af\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10954\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_5.png\" alt=\"\" width=\"256\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_5.png 256w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_5-240x300.png 240w\" sizes=\"auto, (max-width: 256px) 100vw, 256px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u300c<strong>123<\/strong>\u300d\u304c\u672b\u5c3e\u306b\u633f\u5165\u3055\u308c\u3001\u300c<strong>1234567890123<\/strong>\u300d\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<p>\u3067\u306f\u3001\u6b21\u306b\u30ab\u30fc\u30bd\u30eb\u3092\u300c<strong>5<\/strong>\u300d\u3068\u300c<strong>6<\/strong>\u300d\u306e\u9593\u306b\u79fb\u52d5\u3055\u305b\u3001<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10955\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_6.png\" alt=\"\" width=\"255\" height=\"322\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_6.png 255w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_6-238x300.png 238w\" sizes=\"auto, (max-width: 255px) 100vw, 255px\" \/><\/p>\n<p>\u3053\u306e\u72b6\u614b\u3067\u300c<strong>0<\/strong>\u300d\u300c<strong>0<\/strong>\u300d\u300c<strong>0<\/strong>\u300d\u3068\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u3069\u3046\u306a\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10956\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_7.png\" alt=\"\" width=\"250\" height=\"321\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_7.png 250w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_7-234x300.png 234w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u300c<strong>5<\/strong>\u300d\u306e\u5f8c\u308d\u306b\u300c<strong>000<\/strong>\u300d\u304c\u633f\u5165\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5148\u982d\u3068\u6700\u5f8c\u4ee5\u5916\u3092\u9078\u629e\u3057\u3066\u3001<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10957\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_8.png\" alt=\"\" width=\"252\" height=\"321\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_8.png 252w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_8-236x300.png 236w\" sizes=\"auto, (max-width: 252px) 100vw, 252px\" \/><\/p>\n<p>\u3053\u306e\u72b6\u614b\u3067\u300c9\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u3046\u307e\u304f\u9078\u629e\u7bc4\u56f2\u306f\u524a\u9664\u3055\u308c\u308b\u3067\u3057\u3087\u3046\u304b\uff1f\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10958\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_9.png\" alt=\"\" width=\"253\" height=\"322\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_9.png 253w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_9-236x300.png 236w\" sizes=\"auto, (max-width: 253px) 100vw, 253px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u9078\u629e\u7bc4\u56f2\u306a\u524a\u9664\u3055\u308c\u3001\u6700\u7d42\u7684\u306b\u300c<strong>193<\/strong>\u300d\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b\u300c<strong>\u2190<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10959\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_10.png\" alt=\"\" width=\"255\" height=\"318\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_10.png 255w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_10-241x300.png 241w\" sizes=\"auto, (max-width: 255px) 100vw, 255px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u30ab\u30fc\u30bd\u30eb\u306e\u524d\u306b\u3042\u3063\u305f\u300c<strong>9<\/strong>\u300d\u304c\u524a\u9664\u3055\u308c\u3001\u300c<strong>13<\/strong>\u300d\u304c\u6b8b\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u7d9a\u3044\u3066\u300c<strong>C<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u5165\u529b\u5185\u5bb9\u306f\u3046\u307e\u304f\u30af\u30ea\u30a2\u3055\u308c\u308b\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10960\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_11.png\" alt=\"\" width=\"255\" height=\"323\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_11.png 255w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_11-237x300.png 237w\" sizes=\"auto, (max-width: 255px) 100vw, 255px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e\u4e2d\u8eab\u304c\u30af\u30ea\u30a2\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude04\ud83d\udc4d<\/p>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b\uff12\u3064\u76ee\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3082\u8868\u793a\u3055\u308c\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10961\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_12.png\" alt=\"\" width=\"261\" height=\"366\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_12.png 261w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/09\/laravel_react_software_keyboard_12-214x300.png 214w\" sizes=\"auto, (max-width: 261px) 100vw, 261px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\uff12\u3064\u76ee\u3082\u3061\u3083\u3093\u3068\u533a\u5225\u3055\u308c\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\u2728\ud83d\ude04\ud83d\udc4d<\/p>\n<h1>\u30c7\u30e2\u30da\u30fc\u30b8\u3092\u3064\u304f\u308a\u307e\u3057\u305f<\/h1>\n<p>\u4ee5\u4e0b\u306b\u30c7\u30e2\u30da\u30fc\u30b8\u3092\u4f5c\u3063\u305f\u306e\u3067\u305c\u3072\u5b9f\u969b\u306b\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\ud83d\udcdd <a href=\"https:\/\/demo-laravel9x-vite.capilano-fw.com\/software_keyboard\" target=\"_blank\" rel=\"noopener\">\u30c7\u30e2\u30da\u30fc\u30b8<\/a><\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u3088\u3046\u306b\u3061\u3087\u3063\u3068\u3057\u305f\u624b\u9593\u3092\u52a0\u3048\u3066\u304a\u304f\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f55\u5ea6\u3082\u5b9f\u884c\u3059\u308b\u4f5c\u696d\u304c\u697d\u306b\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u696d\u52d9\u52b9\u7387\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\uff08\u4ed6\u306e\u3082\u3063\u3068\u91cd\u8981\u306a\u4f5c\u696d\u306b\u6ce8\u529b\u3067\u304d\u308b\uff09<\/p>\n<ul>\n<li>\u96fb\u8a71\u756a\u53f7\u306e\u5165\u529b<\/li>\n<li>\u90f5\u4fbf\u756a\u53f7\u306e\u5165\u529b<\/li>\n<li>\u500b\u5225\u756a\u53f7\u3084\u5546\u54c1\u30b3\u30fc\u30c9\u306a\u3069\u306e\u5165\u529b<\/li>\n<li>\u5e74\u9f62\u306e\u5165\u529b<\/li>\n<\/ul>\n<p>\u307e\u305f\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f7f\u3046\u3068\u300c\u30ad\u30fc\u30ed\u30ac\u30fc\u203b\u300d\u306e\u5bfe\u7b56\u306b\u3082\u306a\u308b\u3068\u8a00\u308f\u308c\u3066\u304a\u308a\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u5411\u4e0a\u306b\u3082\u5f79\u306b\u7acb\u3064\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u203b \u30ad\u30fc\u30ed\u30ac\u30fc\uff1a \u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5165\u529b\u5c65\u6b74\uff08\u4f8b\u3048\u3070\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\uff09\u3092\u4fdd\u5b58\u3057\u305f\u308a\u5916\u90e8\u3078\u9001\u4fe1\u3059\u308b\u60aa\u610f\u306e\u3042\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3002\u9280\u884c\u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u304c\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u306f\u3053\u3046\u3044\u3063\u305f\u7406\u7531\u3067\u3059\u3002<\/p>\n<p>\u3082\u3057\u3053\u3046\u3044\u3063\u305f\u696d\u52d9\u52b9\u7387\u5316\u3084\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u5bfe\u7b56\u3092\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u3001\u305c\u3072\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u3002\u304a\u5f85\u3061\u3057\u3066\u307e\u3059\u3002m(_ _)m<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u300c<strong>Laravel + React<\/strong>\u300d\u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5316\u3057\u3066\u304a\u304f\u3068\u3001\u3044\u3064\u3067\u3082\u597d\u304d\u306a\u3068\u304d\u306b\u4f7f\u3048\u308b\u306e\u3067\u4fbf\u5229\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u305c\u3072\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u5f53\u521d\u306f<code>useMemo<\/code>\uff08\u51e6\u7406\u306e\u7d50\u679c\u304c\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u308b\u6a5f\u80fd\u3002<code>Vue<\/code>\u306e<code>computed<\/code>\u306e\u3088\u3046\u306a\u3082\u306e\uff09\u3067\u5909\u6570\u3092\u3064\u304f\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u898b\u308b\u9650\u308a\u518d\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u308b\u305f\u3073\u306b\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3057\u305f\u306e\u3067\u3001\u4f7f\u3046\u306e\u3092\u3084\u3081\u307e\u3057\u305f\uff08\u4f55\u304b\u4ed6\u306b\u4f7f\u3044\u65b9\u304c\u3042\u308b\u306e\u3067\u3057\u3087\u3046\u304b\u2026\ud83e\udd14\uff09<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u3082\u3044\u308d\u3044\u308d\u3068\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2173 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24.png\" alt=\"\" width=\"300\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24-281x300.png 281w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>\u300c\u65b0\u305f\u306b\u7f8e\u5473\u3057\u305d\u3046\u306a<br \/>\n\u30d3\u30fc\u30eb\u91b8\u9020\u3092\u767a\u898b\u2757\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001Laravel\u306b\u6a19\u6e96\u642d\u8f09\u3055\u308c\u305fVite\u3092\u304d\u3063\u304b\u3051\u3068\u3057\u3066\u3001\u6700\u8fd1React\u3092\u3088\u304f\u4f7f\u3046\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u304c\u3001\u6614\u89e6\u3063\u3066\u307f\u305f\u3068\u304d\u3068\u9055\u3044\u3068\u3066\u3082\u597d\u611f\u89e6\u3067\u3059\ud83d\ude04 \u305d\u3057\u3066\u3001 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10948\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel + React \u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":10965,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[247,3,118,249,248],"tags":[],"class_list":["post-10948","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-inertia-js","category-laravel","category-react-js","category-tailwind-css","category-vite"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10948"}],"version-history":[{"count":13,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10948\/revisions"}],"predecessor-version":[{"id":10970,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10948\/revisions\/10970"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10965"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}