1. Home
  2. /
  3. Draftbit
  4. /
  5. Habit Tracker

Habit Tracker - Draftbit Typing CST Test

Loading…

Habit Tracker — Draftbit Code

Tracks daily habits with checkmarks using visual Draftbit switches and React Native state.

import React, { useState } from 'react';
import { View, Text, Switch } from 'react-native';

export default function HabitTracker() {
	const [habits, setHabits] = useState([
		{ name: 'Drink Water', done: false },
		{ name: 'Exercise', done: false }
	]);

	const toggleHabit = index => {
		const updated = [...habits];
		updated[index].done = !updated[index].done;
		setHabits(updated);
	};

	return (
		<View style={{ padding: 20 }}>
		{habits.map((h, i) => (
		<View key={i} style={{ flexDirection: 'row', alignItems: 'center', marginVertical: 5 }}>
		<Text style={{ flex: 1 }}>{h.name}</Text>
		<Switch value={h.done} onValueChange={() => toggleHabit(i)} />
		</View>
		))}
		</View>
	);
}

Draftbit Language Guide

Draftbit is a no-code and low-code visual builder for creating React Native mobile apps. It allows designers, founders, and developers to visually build screens, components, and navigation flows, while exporting clean React Native code.

Primary Use Cases

  • ▸MVP mobile app creation
  • ▸React Native UI design and prototyping
  • ▸API-driven mobile applications
  • ▸Startup app development
  • ▸Apps requiring code export for custom development

Notable Features

  • ▸Visual drag-and-drop React Native builder
  • ▸100% exportable React Native code
  • ▸API and backend integrations
  • ▸Custom components support
  • ▸Cross-platform deployment (iOS & Android)

Origin & Creator

Draftbit was created by Brian Luerssen, Peter Piekarczyk, and Nick Selman to make professional mobile app development accessible through a visual interface backed by production-grade React Native code.

Industrial Note

Draftbit is best suited for teams wanting design-to-code mobile app workflows, founders building MVPs, and developers who need a hybrid of no-code speed with full code export for scalability.

More Draftbit Typing Exercises

Draftbit Simple Todo AppDraftbit Expense TrackerDraftbit Notes AppDraftbit Weather ViewerDraftbit Fitness TrackerDraftbit Shopping ListDraftbit Recipe BookDraftbit Simple Login ScreenDraftbit Counter App

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher