Add Dark Theme To Your React Native & Expo projects | Project & Tutorial For Beginners | JavaScript

preview_player
Показать описание

Hello guys, My name is Rohit Kumar Thakur. In this video, I will show you, how to switch between light theme mode to dark theme mode in react native & expo.

React Native Expo is a cross-platform framework, which gonna helps you to build mobile apps for both Android & iOS devices.
The code part is not that much tough. You just have to follow the video to get the desired output. Happy Hacking

𝐁𝐨𝐨𝐤 ( 𝐅𝐫𝐨𝐦 𝐂𝐨𝐝𝐞 𝐓𝐨 𝐂𝐨𝐧𝐧𝐞𝐜𝐭𝐢𝐨𝐧𝐬: 𝐀 𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫’𝐬 𝐠𝐮𝐢𝐝𝐞 𝐭𝐨 𝐛𝐮𝐢𝐥𝐝𝐢𝐧𝐠 𝐚 𝐬𝐨𝐜𝐢𝐚𝐥 𝐜𝐚𝐫𝐞𝐞𝐫 )

Topics covered:
✅ Project setup of react native & expo
✅ Bottom tab navigation in react native & expo
✅ Switch component in react native & expo
✅ Global component handler in react native & expo (react native event listeners)
✅ Dark Mode
✅ Baiscs UI design

My social Links:

Music Source: NCS

Tags: react native, react native tutorial, react native app, react native project, react native tutorial for beginners, react native navigation, react native expo, react native full course, react native animation, react native crash course, react native app development, react native app tutorial, react native app project, react native android, react native ios, react native android app, react native developer, react native CLI, react native crash course, create react native app, code step by step react native, react native design, deploy react native app, react native tutorial in Hindi, react native navigation, what is react native, react native projects, learn react native, react native setup, react native expo tutorial for beginners, react native UI, react native expo, expo react native, react native expo tutorial, small projects in react native, dark mode and light mode code in react native & expo

#reactjs #javascript #reactnative #ios #android #react
Рекомендации по теме
Комментарии
Автор

If you want to learn programming in a fun way then do check this:

BugNinza
Автор

how to save the user selection in localstorage so if he leaves and came back the theme stay the same?

Coder-Journey
Автор

when i put "theme={darkMode === true ? DarkTheme : DefaultTheme}" on the NavigationContainer, code start error: "Cannot read property 'Colors' of undefined"

brenoncio
Автор

Hello! Do you know to fix bug on navigate to another page screen flashes ? I can set background color in app.json but can't do dynamic on theme change. Thanks!

iufb
Автор

Thank you for this! This helped a lot. :D

moniemonie
Автор

StatusBar with DarkTheme is´nt visible. How can i fix it? Any ideas? StatusBar style={"light"} doesn´t work.

cfo
Автор

bro i have when i leave the settings component where my switch is and i come back the switch is back to first state darkmode=false so i need to pass darkmode from app.js not make a usestate(false)? if so how can i pass the darkmode as a prop from app to settingscreen in a setting nav

bilelrahmouni
Автор

I have so many components at this point and i decided to use theming, i couldn't figure out how to access theme.backgound variable inside styles (i'm using the same structure you are using in HomeScreen on all my components) I want to be able to do this:

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: theme.backgound
}
)

elmehdi
Автор

it is showing this error Cannot read property colors undefined

const theme ={
light:{
theme:'light',
color:'black',
background:'white',

},
dark:{
theme:'dark',
color:'white',
background:'black',

}
}
export default theme;

mansoorsahito
Автор

ERROR ReferenceError: Property 'DefaultTheme' doesn't exist {kindly Tell how to solve it }

mansoorsahito
Автор

setDarkMode is not a function
this error is coming

anmolnarang
Автор

where is source code? downvoted and reported

moosegoose
join shbcf.ru