Import Block

import{useState, useEffect}from"react";
import{Button}from"@/ui/button";
import{cn}from"@/lib/utils";
About this piece

Import Block

Stacked import statements with destructured names and module paths in a quiet syntax palette.

Usage

The import and the props worth knowing about, in one place.

import { Code6 } from "@/components/beste/piece/code6";

<Code6
  imports={[
    {
      "names": [
        "useState",
        "useEffect"
      ],
      "source": "react"
    },
    {
      "names": [
        "Button"
      ],
      "source": "@/ui/button"
    },
    {
      "names": [
        "cn"
      ],
      "source": "@/lib/utils"
    }
  ]}
  bordered={false}
/>

More Code pieces

View all Code
TypeError: Cannot read 'name' of undefined
greet(src/utils.ts:14:12)
handler(src/server.ts:42:8)
processRequest(src/api.ts:88:4)
function greet(name) {
return 'Hi ' + name;
return `Hello, ${name}!`;
}
pricing.ts
export function total(cart: Cart) {
const sum = cart.lines.reduce(add, 0)
return sum
const discount = coupon(cart, sum)
return sum - discount
}
const greeting = "Hello, Beste!";ts
# Database
DATABASE_URL=postgres://localhost/beste
REDIS_URL=redis://localhost:6379
PORT=3000
{
"name":"Beste",
"active":true,
"count":42
}