pages/client/[id].js
// The new option 1 values set in test.js should still be visible here via Context API
The new option 1 values set in test.js should still be visible here via Context API
The new option 1 values set in test . js should still be visible here via Context API
function ClientId(props) {
  const { state, setId } = useContext(GlobalContext);
  const [dt, setDT] = useState('init')
  const router = useRouter();
  useEffect(() => {
    console.log(">>>> ClientId  props =", props);
    console.log(">>>> ClientId  state =", state);
    const dateTime = new Date()
    setDT(String(dateTime))
    setId(props.ID);
  }, [props.ID]);
  return (
    <Page
      title
      breadcrumbs={[
        {
          content: "Back",
          onAction: () => {
            router.back();
          },
        },
      ]}
      fullWidth="true"
    >
      <h1>Client Id page  {dt}</h1>
    </Page>
  );
}
function ClientId ( props ) { const { state , setId } = useContext ( GlobalContext ) ; const [ dt , setDT ] = useState ( 'init' ) const router = useRouter ( ) ; useEffect ( ( ) => { console . log ( ">>>> ClientId  props =" , props ) ; console . log ( ">>>> ClientId  state =" , state ) ; const dateTime = new Date ( ) setDT ( String ( dateTime ) ) setId ( props . ID ) ; } , [ props . ID ] ) ; return ( < Page title breadcrumbs = { [ { content : "Back" , onAction : ( ) => { router . back ( ) ; } , } , ] } fullWidth = "true" > < h1 > Client Id page   { dt } < / h1 > < / Page > ) ; }
The new option 1 values set in test.js should still be visible here via Context API
The new option 1 values set in test . js should still be visible here via Context API
//console.log('>>>>> Test2 this.props.context.state =', this.props.context.state);