@prefresh/next

1.7.0 • Public • Published

Prefresh-next

npm version

Setup

npm i -s @prefresh/next
## OR
yarn add @prefresh/next

Then add it to your next config by doing

const withPrefresh = require('@prefresh/next');
module.exports = withPrefresh()
}

Best practices

Recognition

We need to be able to recognise your components, this means that components should start with a capital letter and hook should start with use followed by a capital letter. This allows the Babel plugin to effectively recognise these.

Do note that a component as seen below is not named.

export default () => {
  return <p>Want to refresh</p>;
};

Instead do:

const Refresh = () => {
  return <p>Want to refresh</p>;
};

export default Refresh;

When you are working with HOC's be sure to lift up the displayName so we can recognise it as a component.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.7.0
    5,463
    • latest

Version History

Package Sidebar

Install

npm i @prefresh/next

Weekly Downloads

7,860

Version

1.7.0

License

MIT

Unpacked Size

18.1 kB

Total Files

7

Last publish

Collaborators

  • jdecroock
  • marvinhagemeister
  • developit