質問編集履歴

6

質問の解答

2021/06/01 01:25

投稿

aiai8976
aiai8976

スコア112

test CHANGED
File without changes
test CHANGED
@@ -451,3 +451,17 @@
451
451
 
452
452
 
453
453
  ```
454
+
455
+
456
+
457
+ 例えばvalueをvalue_にすると以下のようにエラーが出力されます。
458
+
459
+ SuggestionsFetchRequestedParamsを自分で定義していない(@type/react-autosuggestで定義している?)ので、どのように対応したらいいのかわかりません。
460
+
461
+
462
+
463
+ ```
464
+
465
+ プロパティ 'value_' は型 'SuggestionsFetchRequestedParams' に存在しません。
466
+
467
+ ```

5

質問の解答

2021/06/01 01:24

投稿

aiai8976
aiai8976

スコア112

test CHANGED
File without changes
test CHANGED
@@ -303,3 +303,151 @@
303
303
 
304
304
 
305
305
  ```
306
+
307
+
308
+
309
+ ###コメントに対して
310
+
311
+
312
+
313
+ package.json
314
+
315
+
316
+
317
+ ```
318
+
319
+ {
320
+
321
+ "name": "catwiki_front",
322
+
323
+ "version": "0.1.0",
324
+
325
+ "private": true,
326
+
327
+ "dependencies": {
328
+
329
+ "@chakra-ui/icons": "^1.0.13",
330
+
331
+ "@chakra-ui/react": "^1.6.0",
332
+
333
+ "@emotion/react": "^11.1.5",
334
+
335
+ "@emotion/styled": "^11.3.0",
336
+
337
+ "@testing-library/jest-dom": "^5.12.0",
338
+
339
+ "@testing-library/react": "^11.2.6",
340
+
341
+ "@testing-library/user-event": "^12.8.3",
342
+
343
+ "@types/jest": "^26.0.23",
344
+
345
+ "@types/node": "^12.20.10",
346
+
347
+ "@types/react": "^17.0.4",
348
+
349
+ "@types/react-autosuggest": "^10.1.4",
350
+
351
+ "@types/react-dom": "^17.0.3",
352
+
353
+ "@types/react-router-dom": "^5.1.7",
354
+
355
+ "framer-motion": "^4.1.11",
356
+
357
+ "react": "^17.0.2",
358
+
359
+ "react-autosuggest": "^10.1.0",
360
+
361
+ "react-dom": "^17.0.2",
362
+
363
+ "react-masonry-css": "^1.0.16",
364
+
365
+ "react-router-dom": "^5.2.0",
366
+
367
+ "react-scripts": "4.0.3",
368
+
369
+ "typescript": "^4.2.4",
370
+
371
+ "web-vitals": "^1.1.1"
372
+
373
+ },
374
+
375
+ "scripts": {
376
+
377
+ "start": "react-scripts start",
378
+
379
+ "build": "react-scripts build",
380
+
381
+ "test": "react-scripts test",
382
+
383
+ "eject": "react-scripts eject"
384
+
385
+ },
386
+
387
+ "eslintConfig": {
388
+
389
+ "extends": [
390
+
391
+ "react-app",
392
+
393
+ "react-app/jest"
394
+
395
+ ]
396
+
397
+ },
398
+
399
+ "browserslist": {
400
+
401
+ "production": [
402
+
403
+ ">0.2%",
404
+
405
+ "not dead",
406
+
407
+ "not op_mini all"
408
+
409
+ ],
410
+
411
+ "development": [
412
+
413
+ "last 1 chrome version",
414
+
415
+ "last 1 firefox version",
416
+
417
+ "last 1 safari version"
418
+
419
+ ]
420
+
421
+ },
422
+
423
+ "devDependencies": {
424
+
425
+ "@typescript-eslint/eslint-plugin": "^4.22.0",
426
+
427
+ "@typescript-eslint/parser": "^4.22.0",
428
+
429
+ "eslint": "^7.25.0",
430
+
431
+ "eslint-config-airbnb": "^18.2.1",
432
+
433
+ "eslint-config-prettier": "^8.3.0",
434
+
435
+ "eslint-plugin-import": "^2.22.1",
436
+
437
+ "eslint-plugin-jsx-a11y": "^6.4.1",
438
+
439
+ "eslint-plugin-prettier": "^3.4.0",
440
+
441
+ "eslint-plugin-react": "^7.23.2",
442
+
443
+ "eslint-plugin-react-hooks": "^4.2.0",
444
+
445
+ "prettier": "^2.2.1"
446
+
447
+ }
448
+
449
+ }
450
+
451
+
452
+
453
+ ```

4

修正

2021/06/01 01:22

投稿

aiai8976
aiai8976

スコア112

test CHANGED
File without changes
test CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  以下のようなエラーが出て困っています。
10
10
 
11
+ valueの変数名を変えるとそのようなtypeはないと言われるので、ルールをoffにしようかなと思い、
12
+
11
13
  調べてみたところ、.eslintrc.jsにルールを追加すればいけるらしいのですが、うまくいきませんでした。
12
14
 
13
15
  わかる方がいましたら、コメントお願いします。

3

修正

2021/05/31 08:05

投稿

aiai8976
aiai8976

スコア112

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- react-sutosuggetionsを導入したいと思っています。
5
+ react-autosuggetionsを導入したいと思っています。
6
6
 
7
7
  自分の環境はtypescriptなので書き換えたものを利用したいのですが、
8
8
 

2

修正

2021/05/31 08:03

投稿

aiai8976
aiai8976

スコア112

test CHANGED
File without changes
test CHANGED
@@ -14,6 +14,12 @@
14
14
 
15
15
 
16
16
 
17
+ ####参考
18
+
19
+ [https://codesandbox.io/s/zx4ht?file=/src/index.tsx:0-1517](https://codesandbox.io/s/zx4ht?file=/src/index.tsx:0-1517)
20
+
21
+
22
+
17
23
  ### 発生している問題・エラーメッセージ
18
24
 
19
25
 

1

修正

2021/05/31 07:53

投稿

aiai8976
aiai8976

スコア112

test CHANGED
File without changes
test CHANGED
@@ -295,11 +295,3 @@
295
295
 
296
296
 
297
297
  ```
298
-
299
-
300
-
301
- ### 補足情報(FW/ツールのバージョンなど)
302
-
303
-
304
-
305
- ここにより詳細な情報を記載してください。