+ 1
How to create app begginer
8 Antworten
+ 7
If you want to build a mobile app for Android, learn Kotlin or Java.
For Apple / iOS, learn Swift.
For web application, you can start with Javascript, but the back-end can be written in any general purpose programming language.
+ 1
Learn dart and flutter , its an equivalent of React. Youll be able to create android and Ios apps
0
Thanks
0
So what language do you recommend
0
Thanks
0
Here is a simple example of a React Native app that displays "Hello, World!" on the screen:
import React from 'react';
import { Text, View } from 'react-native';
export default function App() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Hello, World!</Text>
</View>
);
}
This app uses the Text and View components from React Native to display some text on the screen. The View component acts as a container, and the Text component displays the text "Hello, World!".
To run this app, you will need to install React Native and set up a development environment on your computer. You can find more information on how to do this in the React Native documentation.
0
To create an on/off switch (also known as a Switch component in React Native) in your React Native app
import React, { useState } from 'react';
import { View, Switch } from 'react-native';
export default function App() {
const [isOn, setIsOn] = useState(false);
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Switch
value={isOn}
onValueChange={(value) => setIsOn(value)}
/>
</View>
);
}
0
Create on/off switch in flutter.
In the main.dart file, import the material.dart package:
import 'package:flutter/material.dart';
In the build method of the MyApp class:
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Switch(
value: _switchIsOn,
onChanged: _toggleSwitch,
),
),
),
);
}
In the MyApp class:
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
bool _switchIsOn = false;
void _toggleSwitch() {
setState(() {
_switchIsOn = !_switchIsOn;
});
}
// ...
}