jrlarsen / react-hooks-in-action Goto Github PK
View Code? Open in Web Editor NEWCode for the book React Hooks in Action
Home Page: http://www.room51.co.uk/books/reacthooks/index.html
Code for the book React Hooks in Action
Home Page: http://www.room51.co.uk/books/reacthooks/index.html
Sorry, I have often struggled with npm install conflicts. Here is what I found:
git checkout 1305-multi-suspense
Branch '1305-multi-suspense' set up to track remote branch '1305-multi-suspense' from 'origin'.
Switched to a new branch '1305-multi-suspense'
rob@DESKTOP-0APTBSM:~/dv/node/react-hooks-in-action$ npm i
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^0.0.0-experimental-3310209d0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from [email protected]
npm ERR! node_modules/react-query
npm ERR! react-query@"^3.5.11" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/rob/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/rob/.npm/_logs/2021-07-30T23_06_30_680Z-debug.log
I will experiment with --force and --legacy-peer-deps and npm-check-updates. I wonder when the features will no longer become experimental. I would like to see as much of the full booking example as possible and so I can browse the code in my IDE. Thanks so much. I love the new book!
This import statement
import {bookables} from "../../static.json";
Kept throwing an error when using filter with bookables. The following worked though..
const json = require('../../static.json');
export default function BookableList() {
const bookablesInGroup = json.bookables.filter(b => b.group === group);
When I use branch 2040-set-index I get the following error:
ERROR in ./src/components/Bookables/BookablesList.js 13:27-43
export 'bookables'.'filter' (imported as 'bookables') was not found in '../../static.json' (possible exports: 0, 1, 2, 3, 4, 5)
@ ./src/components/Bookables/BookablesPage.js 4:0-44 9:35-48
@ ./src/components/App.js 7:0-54 124:40-53
@ ./src/index.js 5:0-38 7:38-41
ERROR in ./src/components/Bookables/BookablesList.js 15:14-23
Should not import the named export 'bookables' (imported as 'bookables') from default-exporting module (only default export is available soon)
@ ./src/components/Bookables/BookablesPage.js 4:0-44 9:35-48
@ ./src/components/App.js 7:0-54 124:40-53
@ ./src/index.js 5:0-38 7:38-41
webpack 5.66.0 compiled with 2 errors in 102 ms
The MEAP v4 of the book lists the URL of this site as https://github.com/jrlarsen/ReactHooks rather than https://github.com/jrlarsen/react-hooks-in-action .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.