AI Documentaion(Fast, Easy & Free start)

Land your next role with DocAI, the AI-powered documentation assistant that turns your GitHub repos into polished, developer-ready docs in seconds. Access DocAI from your computer or phone, choose from a library of industry-approved doc templates, and insert context-aware code explanations and examples with a single click.

Pay as you go

Pay as you go

$0.005 / 1K tokens
  • Real-time code analysis
  • Automated Markdown formatting
  • GitHub integration
  • Team collaboration (coming soon)
  • Priority support (coming soon)
type Event = {
  id: string;
  name: string;
  city: string;
  date: string;
};
const EventList: React.FC = () => {
  const [events, setEvents] = useState<Event[]>([]);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState<string | null>(null);
  useEffect(() => {
    fetch('/api/events')
      .then(res => {
        if (!res.ok) throw new Error('Network error');
        return res.json();
      })
      .then(data => setEvents(data))
      .catch(err => setError(err.message))
      .finally(() => setLoading(false));
  }, []);
  if (loading) {
    return <div>Loading events...</div>;
  }
  if (error) {
    return <div>Error: {error}</div>;
  }
  return (
    <div>
      {events.map(event => (
        <div key={event.id}>
          <h2>{event.name}</h2>
          <p>{event.city}</p>
          <p>{event.date}</p>
        </div>
      ))}
    </div>
  );
};
export default EventList;