Software & DevOps

Get a missing UI component written

A developer asked ChatGPT how to add a copy-to-clipboard button in a UI library. It said the library didn't have one and wrote one, which saved some digging.

Steps

  1. Ask the question.
  2. Use the code it gives you.
  3. Adapt it to your project.

Prompt you can copy

How do I add a copy-to-clipboard button in [framework]? If none exists, write a component.

Tools

  • ChatGPT

For Developers. Added .

Source

hn ·

Related use cases

Software & DevOps

Generate infrastructure code from a design diagram

An engineer gives ChatGPT a labeled design diagram with detailed security notes and gets back working CDK and Terraform code.

Caution. Never apply infrastructure code you haven't reviewed.

DevelopersChatGPT

Software & DevOps

Generate test cases for your project

Building their own Lisp, one developer gave ChatGPT a few sample tests and had it write more for the test suite.

DevelopersChatGPT