2.1.0 • Published 2 years ago
@lens-protocol/widgets-react v2.1.0
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
2 years ago
0.0.20
2 years ago
0.0.21
2 years ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.5
2 years ago
2.0.4
2 years ago
2.0.7
2 years ago
2.0.6
2 years ago
2.0.9
2 years ago
2.0.8
2 years ago
0.0.18
2 years ago
0.0.19
2 years ago
2.0.1
2 years ago
0.0.30
2 years ago
0.0.31
2 years ago
0.0.32
2 years ago
0.0.33
2 years ago
0.0.34
2 years ago
0.0.12
2 years ago
0.0.13
2 years ago
0.0.14
2 years ago
0.0.15
2 years ago
0.0.16
2 years ago
0.0.17
2 years ago
0.0.10
2 years ago
0.0.11
2 years ago
0.0.8
2 years ago
0.0.5
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago