Better example code / tutorial?
See original GitHub issueI’m unable to get a simple example running with any of the example code on the website in a React Codesandbox. Is there any fully working example that can be provided?
import "./styles.css";
import React from "react";
import { Command } from "cmdk";
export default function App() {
const loading = true;
const setOpen = () => {};
const open = true;
return (
<div className="App">
<h1>Hello CodeSandbox</h1>
<h2>Start editing to see some magic happen!</h2>
<Command.Dialog open={open} onOpenChange={setOpen}>
<Command.Input />
<Command.List>
{loading && <Command.Loading>Hang on…</Command.Loading>}
<Command.Empty>No results found.</Command.Empty>
<Command.Group heading="Fruits">
<Command.Item>Apple</Command.Item>
<Command.Item>Orange</Command.Item>
<Command.Separator />
<Command.Item>Pear</Command.Item>
<Command.Item>Blueberry</Command.Item>
</Command.Group>
<Command.Item>Fish</Command.Item>
</Command.List>
</Command.Dialog>
</div>
);
}
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to write a Good Technical Tutorial - freeCodeCamp
It's always helpful to provide code snippets in your technical tutorials. This will let your readers know what you are doing and what...
Read more >How to Code for Beginners: Best Ways to Learn How to Code
Alternatively, you can choose BitDegree's interactive Java tutorial. This course will teach you the basic syntax and features of the language.
Read more >6 Tips on How to Write Better Tutorials, Part 2 - Coding Writer
In your text, you explain what recursion is, what it's good for and how it works. But in your code example, you point...
Read more >How to Start Coding: The Ultimate Guide for Beginner ...
Want to learn how to code but unsure where to start? ... For example, say you want to become a developer to earn...
Read more >Top 100+ Websites to Learn to Code for Free
The tutorials come with many code examples and vary in topics and difficulty levels. It also has an online code editor called Try...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I faced the same, tried using previous versions and 0.1.16 works. Something got introduced in 0.1.17 it seems. You can do same till the error is fixed I guess
I fixed the issue by overriding one of the dependencies in the package.json: