Issue 1:
Do you want to request a feature or report a bug?

No,

What is the current behavior?

The component rerenders 3 more times than needed

What is the expected behavior?

The component to rerender once

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

16.8

import React from "react";
import ReactDOM from "react-dom";
import { Lower } from "./lower";

import "./styles.css";

function App() {
const [state, setState] = React.useState("nochange");
const change = () => {
console.log("runs");
setState("change");
};
return (
<div className="App">
<Lower mode={state} />
<p />
<button onClick={() => change()}>click to change</button>
</div>
);
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

import React from "react";

export const Lower = props => {
const [state, setState] = React.useState(1);
console.log(props.mode);
React.useEffect(() => {
props.mode === "change" && setState(2);
});
return state;
};

My repo is https://codesandbox.io/s/kkkl61mrzv and I am trying to send a prop to my child via manipulating the state with the new hooks. the component does work however in my console.log I can see that the component rerenders quite a few times. please help me find a proper way to have this done with rerendering once.

Issue 2:
React version: 17.0.2

Steps To Reproduce

yarn install

yarn build:admin-react

node server2

Link to code example:

https://github.com/see/ssr-demo

The current behavior

(node:97731) UnhandledPromiseRejectionWarning: Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at R (/Users/ying/workspace/FEProjects/ssr-demo/dist/admin-react/node/static/js/main.01e60cfb.js:2:5394)
at t.useContext (/Users/ying/workspace/FEProjects/ssr-demo/dist/admin-react/node/static/js/main.01e60cfb.js:2:7108)
at C (/Users/ying/workspace/FEProjects/ssr-demo/dist/admin-react/node/static/js/main.01e60cfb.js:2:14117)
at A (/Users/ying/workspace/FEProjects/ssr-demo/dist/admin-react/node/static/js/main.01e60cfb.js:2:15285)
at processChild (/Users/ying/workspace/FEProjects/ssr-demo/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14)
at resolve (/Users/ying/workspace/FEProjects/ssr-demo/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
at ReactDOMServerRenderer.render (/Users/ying/workspace/FEProjects/ssr-demo/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
at ReactDOMServerRenderer.read (/Users/ying/workspace/FEProjects/ssr-demo/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
at renderToString (/Users/ying/workspace/FEProjects/ssr-demo/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
at /Users/ying/workspace/FEProjects/ssr-demo/server2.js:29:22
(Use `node --trace-warnings ...` to show where the warning was created)
(node:97731) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

The expected behavior