Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Fetches weather data using a public API and displays it in a Draftbit app layout.
import React, { useState } from 'react';
import { View, TextInput, Button, Text } from 'react-native';
export default function WeatherApp() {
const [city, setCity] = useState('');
const [weather, setWeather] = useState(null);
const fetchWeather = async () => {
const res = await fetch(`https://api.weatherapi.com/v1/current.json?key=YOUR_API_KEY&q=${city}`);
const data = await res.json();
setWeather(data.current);
};
return (
<View style={{ padding: 20 }}>
<TextInput placeholder='Enter City' value={city} onChangeText={setCity} />
<Button title='Get Weather' onPress={fetchWeather} />
{weather && <Text>Temp: {weather.temp_c}°C</Text>}
</View>
);
}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.
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.