2.1.0 • Published 5 months ago

@lens-protocol/widgets-react v2.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Lens Widgets React library

Installation

npm install @lens-protocol/widgets-react

With Next.js

If you are using Next.js pages directory please update your next.config.js with the following:

transpilePackages: ['@lens-protocol'],

So the final configuration might look like this:

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  swcMinify: true,
  transpilePackages: ['@lens-protocol']
}
module.exports = nextConfig

Once this update is made, please re-run the server:

npm run dev

Another option when working with Next.js pages directory apps is using a Dynamic Import:

/* Profile created in separate component */
import {
  Profile
} from '@lens-protocol/widgets-react'

export default function ProfileComponent() {
  return (
    <Profile handle='lens/christina' />
  )
}

/* ProfileComponent imported using a dynamic import */
import dynamic from 'next/dynamic'
const ProfileComponent = dynamic(() => import('../components/ProfileComponent'), { ssr: false })

export default () => {
  return (
    <div>
      <ProfileComponent />
    </div>
  )
}
2.1.0

5 months ago

0.0.20

10 months ago

0.0.21

10 months ago

2.0.3

6 months ago

2.0.2

6 months ago

2.0.5

6 months ago

2.0.4

6 months ago

2.0.7

6 months ago

2.0.6

6 months ago

2.0.9

5 months ago

2.0.8

6 months ago

0.0.18

10 months ago

0.0.19

10 months ago

2.0.1

6 months ago

0.0.30

10 months ago

0.0.31

9 months ago

0.0.32

8 months ago

0.0.33

8 months ago

0.0.34

8 months ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

12 months ago

0.0.16

12 months ago

0.0.17

11 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago