question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs: legacyBehavior

See original GitHub issue

What is the improvement or update you wish to see?

I would like to see some explanation of what legacyBehavior means and why I’m suddenly getting warnings in my console about it.

Is there any context that might help us understand?

My console is filled with messages like "onClick" was passed to <Link> with href of /blog but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link

The documentation makes no mention of legacyBehavior. The only official mention of it is a link to a PR near the bottom of the page in this blog post. I feel like if you’re going to litter my console with warning messages, there should be some official documentation explaining what the warning message actually means.

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/api-reference/next/link

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JuanSystemscommented, Aug 2, 2022

amigo yo solucione el problema de esta forma:

<div className={`links ${clicked ? "active" : ""}`}>
            <Link href="/">
              <a onClick={handleClick}> Home</a>
            </Link>
            <Link href="/">
              <a onClick={handleClick}> Shop</a>
            </Link>
            <Link href="/">
              <a onClick={handleClick}> Blog</a>
            </Link>
          </div>

Espero que te ayude.

0reactions
github-actions[bot]commented, Sep 2, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

LegacyBehavior (Camunda BPM Javadocs 7.10.19-ee)
This class encapsulates legacy runtime behavior for the process engine. Since 7.3 the behavior of certain bpmn elements has changed slightly.
Read more >
next/link | Next.js
Note, when legacyBehavior is not set to true , all anchor tag properties can be passed to next/link as well such as, className...
Read more >
LegacyBehaviors Enumeration | Spread Windows Forms 13.0 ...
All behaviors are compatible with previous version. AutoRowHeight, Row height won't be auto adjusted when cell's value or properties are changed on UI...
Read more >
Requiring permission to attach service accounts to resources
To manually disable the legacy behavior for Dataproc, Dataflow, and Cloud Data Fusion, ensure that users have permission to impersonate the service accounts ......
Read more >
Migration Guide: SQL, Datasets and DataFrame - Apache Spark
To restore the legacy behavior of always returning string types, set spark.sql.legacy. ... See the API docs for SQLContext.read ( Scala, Java, Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found