If you’ve been looking to use React Hooks in ZepKit you’ll probably have noticed they don’t work. To get them working you will need to bump your React Version up from 16.7 to 16.8, which is where Hooks are introduced.
The process is simple:
Enter your client folder and open your package.json
it should look like:
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"classnames": "^2.2.6",
"json-loader": "^0.5.7",
"node-sass": "^4.11.0",
"react": "^16.7.0",
"react-app-rewired": "^2.1.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3",
"rimble-ui": "^0.7.0",
"styled-components": "^4.1.3",
"tabookey-gasless": "^0.3.3-a",
"web3": "1.0.0-beta.37",
"zeppelin-solidity-hot-loader": "1.0.0"
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {}
}
Notice that both "react": "^16.7.0"
and "react-dom": "^16.7.0"
are on version 16.7. Just change the 7 to an 8 and then run npm install
. It will update your react to the latest version and you’ll be ready to use Hooks!