Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

139
Views
React 17 Warning: Did not expect server HTML to contain a <a> in <div>

I have read through the existing solutions and still cant seem to get it to work.

components/NavBar.tsx

import { Box, Link } from "@chakra-ui/react";
import { FunctionComponent } from "react";
import NextLink from "next/link";

interface NavBarProps {}

const NavBar: FunctionComponent<any> = (props) => {
  return (
    <Box {...props} bg="tomato" w="100%" p={4} ml={"auto"} color="white">
      <NextLink href="/login">
        <Link mr={4}>Login</Link>
      </NextLink>
      <NextLink href="/register">
        <Link>Register</Link>
      </NextLink>
    </Box>
  );
};

export default NavBar;

index.tsx

import NavBar from "../components/navbar";

const Index = () => (
  <>
    <NavBar></NavBar>
    <div>hello world</div>
  </>
);

export default Index;

Error Screenshot Error Messsage

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try

<NavBar/>

instead of

<NavBar></NavBar>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!