Skip to content

next@beta-31 breaks navigation on page #1205

@khrome83

Description

@khrome83

When loading page, the follow displays within the error console. This was after switching to next/link over the older next/prefetch

screen shot 2017-02-18 at 11 56 56 am

Upon clicking a link, the following error is generated in the console.

screen shot 2017-02-18 at 11 57 25 am

Upon generating these errors, navigation does not continue to the next page, and instead shows the current page and destroys all existing styles.

Example Code -

import React, { PropTypes } from 'react';
import Link from 'next/link';
import SVG from './SVG';

function Logo({ href, title, id, width, height }) {
  const linkProps = { title };

  return (
    <span className="logo">
      <Link prefetch href={href} >
        <a {...linkProps} >
          <SVG id={id} width={width} height={height} />
        </a>
      </Link>
      <style jsx>{`
        .logo {
          color: #F0F;
        }
      `}</style>
    </span>
  );
}

Logo.defaultProps = {
  width: 'auto',
  height: 'auto',
};

Logo.propTypes = {
  href: PropTypes.string.isRequired,
  title: PropTypes.string.isRequired,
  id: PropTypes.string.isRequired,
  width: PropTypes.string,
  height: PropTypes.string,
};

export default Logo;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions