As a web developer, can you explain why React is needed?
In the early days of the internet, web sites were essentially made of static HTML files. Web servers were little more than file servers, when a user would come to a url, the web server would simply fetch it, and send it to the user via their browser, along with all kind of assets, like fonts and images.
The functionality of this kind of web pages are very limited, so eventually the web became more dynamic. When people would visit a page or interact with a form, instead of just fetching data, the server could perform an operation and prepare some content on demand. That content would still be sent to the user’s browser. There could also a little bit of code running on the browser, to animate pages, handle form and what not, but not very much.
So up until around 2010, that was the dominant model. Code could be involved to generate content but the browser wouldn’t do much, most of the logic would happen on servers which would just send prepared content to the browser.
However, in the early 2010s, this paradigm started to shift. With HTML5/CSS3, the browser became much more capable, and so people started to move the logic that would generate content from the server to the browser. Instead of sending a whole styled HTML page, a web server could just send the data needed to create it. Then, code could run on the browser to actually turn that data into HTML. That browser code could also update what the user would see, making just the required data calls.
So, in the early to mid 2010s, front-end code would typically:
- render complex web pages from data retrieved from back-end,
- simulate “navigation” between different views: when the user would do some actions, the entire page would change, the url would update etc. but without actually loading a new page from the server.
- maintain the state of an application: the application could track certain things about the user and the session, and won’t have to reload that information from the server all the time.
- dynamically update both contents and style of a web page.
Now, all of this is possible to do in “vanilla javascript”. But it’s really cumbersome to implement it, and especially tricky to do it in a performant way. There are millions and millions of “web apps” that are replacing the static “web sites” of old, and which all need to dynamically render content. Should developers reimplement that from scratch each time?
Enter the web frameworks such as React. These frameworks are abstractions that let the developers focus on the logic of their web app (where the data comes from, how content is organized) without being tied to the nitty gritty. Web frameworks make developers organize their code in building blocks called modules or components. Somebody could write a header component and someone else building a page could reuse that header component. And a third developer could change the header component, and that change would be reflected everywhere the component is used. Folks could also build 3rd party libraries compatible with the web framework ecosystem, that would address common problems that many developers face. For instance, someone could create a date picker component (a notably tricky interface) that anyone can reuse and customize. Or create a solution to deal with very long pages by only rendering what is in the browser viewport, and creating/deleting elements as a user would scroll.
To have the support of this ecosystem is a huge productivity boost. There are millions of developers who work with React, and the most popular React libraries are very elegant solutions to hard problems(the same could be said of Angular, Vue etc. though their communities are a bit smaller).
React and web frameworks aren’t exactly needed, in fact there is a reverse trend in the last couple of years to go back to server generated content in some cases or to only use vanilla javascript, but it’s a very solid foundation to build a web app.
Comments:
1- The specific rationale for React is state management and efficient page updates, it’s underlying power comes not just from the structure and tooling provided by it being a framework, but also the shadow-DOM and component lifecycle that along with state management empower greater interactivity without very slow inefficient page updates.
2- React isn’t needed, but it is a great framework that can reduce the amount of work you do in making a website/webapp.
React is great for widgets and implementing patterns. You can keep data/text separate from structure and behavior. React, angular and vue are all popular frameworks. Before that we used stuff like dust, handlebars, jQuery and UI libraries like dojo and jQuery UI.
Developers are always looking for ways to be more efficient and more maintainable. React is a current iteration tool for being more efficient.
3- It is needed as a pattern for the devs to create packages that will works (The React packages). In NPM there are many packages, but all them are following its own logic, docs or no docs, they are based on another packages, etc. With things like React, you are somehow limited to follow its rules and you are entering its ecosystem which is good. This is true for all frameworks/libraries.
React also has some configurations which follows the best practices (create-react-app, NextJS, etc), but this is the same and for others.
The difference is that React is close to JS and there is a lot of freedom, what to use like a package, starter pack, use or not Typescript
- Nx + React Native Web + Dockerby Alper Çıtak (Reactnative on Medium) on June 26, 2022 at 7:02 am
Setup Nx monorepo React Native Web with Docker (and Expo)Continue reading on Medium »
- React Coding Interview Challenge 20by Justin Sherman (React on Medium) on June 26, 2022 at 4:58 am
Print user-submitted text word by wordContinue reading on Medium »
- Creating a Web3 Charity Applicationby Sohum Padhye (React on Medium) on June 26, 2022 at 3:29 am
In my previous article, I went over how I created a GIF portal on the Solana blockchain using a tutorial on Buildspace. Over the past few…Continue reading on Medium »
- Using NextJS and Laravel to Display your MySQL databy Jayakusuma (React on Medium) on June 26, 2022 at 2:09 am
Last post i shared on how i managed to make NextJS able to receive external API.Continue reading on Medium »
- Looking for a project starter with login, registration, password reset, no cookie email 2fa and authorization/rolesby /u/bushwacker (React – A JavaScript library for building user interfaces) on June 25, 2022 at 10:43 pm
There are plenty of these things for spring but I have spent the last four hours downloading stuff And they are all very superficial, missing a lot or very out of date. This is "every site has this requirement " stuff. Any help would be appreciated. submitted by /u/bushwacker [link] [comments]
- [Beginner] How do I loop an entire program while keeping variablesby /u/BurntIceCube_ (React – A JavaScript library for building user interfaces) on June 25, 2022 at 10:24 pm
I have a drag and drop card matching program. It gives you 6 pictures, and you have to match 3 similar pictures to the corresponding 3 of the 6. I want to be able to add a progress bar so that whenever the code is completed, it will run again until the progress bar is filled. (1) How do I rerun the program, and (2) how do I keep the progress bar variable. Currently my thought process is keeping the progress bar as a global variable, but I hear that is bad practice. I also don't know how to recall the program. Do I call the constructor to reset everything? Do I just call <MatchingGame /> if (progressBar != 10)? submitted by /u/BurntIceCube_ [link] [comments]
- TypeScript with React Tutorialby Savannah TechStack (React on Medium) on June 25, 2022 at 9:07 pm
IntroductionContinue reading on Dev Genius »
- Create a Netflix Video Player with React-Player, Typescript, and Styled-Componentsby Piotr Kananowicz (React on Medium) on June 25, 2022 at 8:32 pm
Recently, at work, I got a task in which I had to prepare a video player from scratch with custom controls and Netflix style.Continue reading on Medium »
- WTF is TypeScript?by Nicos Tsourektsidis (React on Medium) on June 25, 2022 at 7:24 pm
If you want to get an idea about what TypeScript is and how it could help you, this article is for you, my friend.Continue reading on Medium »
- Day 7 of #100daysofcodeby Harshad Rathod (React on Medium) on June 25, 2022 at 5:45 pm
Today we will learn how to validate custom React component props with proptype. Our initial code will be :Continue reading on Medium »
- ✨React 四大核心概念之二:網站開發就像疊積木一樣!by Echo Shih (React on Medium) on June 25, 2022 at 5:33 pm
#Complete React Developer in 2022 學習筆記 — 2Continue reading on Medium »
- Redux — A birds-eye viewby Joel Chi (React on Medium) on June 25, 2022 at 5:16 pm
Simply put, Redux is a state management library that helps us to keep the state of our whole app in a single place.Continue reading on Level Up Coding »
- ✨React 四大核心概念之ㄧ:DOM留給我處理!by Echo Shih (React on Medium) on June 25, 2022 at 4:22 pm
#Complete React Developer in 2022 學習筆記 — 2Continue reading on Medium »
- Fetch 5 or 10 of the data | ReactJsby /u/Friendly_Rub1342 (React – A JavaScript library for building user interfaces) on June 25, 2022 at 12:25 pm
I'm trying to make a search input, when the user types it show the fetching data, now I'm fetching all the data from the api, but I want to fetch the first 5 or 10 data only, and when the user types something it shows the rest of the data. The Code: import React, { useEffect, useState } from "react" const Table2 = () => { const [posts, setPosts] = useState([]) const fetchData = () => { fetch("/posts") .then(response => { return response.json() }) .then(data => { setPosts(data) }) } useEffect(() => { fetchData() }, []) return ( <table> <tbody> <tr> <th>Name</th> <th>Surname</th> </tr> {posts.map(post => ( <tr key={post._id}> <td>{post.title}</td> <td>{post.username}</td> </tr> ))} </tbody> </table> ) } export default Table2; My question is how to fetch only 5 or 10 not the all data? submitted by /u/Friendly_Rub1342 [link] [comments]
- React form validation react-hook-form and mui json-schema-formby /u/Beneficial-Panda-758 (React – A JavaScript library for building user interfaces) on June 25, 2022 at 10:06 am
Hi all, sorry of title is misleading but can anyone explain to me the differences and usage. I need to use MUI as I need some solutions to build forms/fields from JSON schema I thought to combine MUI with react json-schema-form (there is package for MUI (react-jsonschema-form-material-ui) . So my question is, is this enough to build forms and do validation or do I need on top of this something like react-hook-form? submitted by /u/Beneficial-Panda-758 [link] [comments]
- Top 10 React Interview Questions for 2022by /u/Patient_Airport_2288 (React – A JavaScript library for building user interfaces) on June 25, 2022 at 9:33 am
submitted by /u/Patient_Airport_2288 [link] [comments]
- How can I make this infinite rolling animation with React?by /u/JealousInstruction92 (React – A JavaScript library for building user interfaces) on June 25, 2022 at 7:44 am
https://www.pinterest.co.kr/pin/14425661313638145/ submitted by /u/JealousInstruction92 [link] [comments]
- Fully Functional Youtube Clone Using Firebase, FFmpeg, And React *[Part-3]*by /u/DecodeBuzzingMedium (React – A JavaScript library for building user interfaces) on June 25, 2022 at 7:02 am
An exact clone of youtube with all functionalities from View count to Subscribe to everything (Without Youtube Api) Using Firebase, FFmpeg, And React https://reddit.com/link/vk98wb/video/ax3ff1tcup791/player What We Gonna go in this Part Soin this part First let’s add firebase to our app then we can create the firebase Context API. We’ll implement the Entire Authentication system of firebase and complete our context file. Github Code Again for new viewers, The Github code has been uploaded here! You can check it out! Note: Following are the different parts of this project in order: Part 1 — Intro to the Project and Features Explanation Part 2 — Create the skeleton of the app from adding redux to adding all screens with dummy data and at last adding routes Part 3 — Adding Firebase to our App, Creating Context Api, Completing Authentication Login from the web (This Article) I’ll update the order as we Move on :)) submitted by /u/DecodeBuzzingMedium [link] [comments]
- loop in JSXby /u/HaveNoIdea20 (React – A JavaScript library for building user interfaces) on June 25, 2022 at 6:23 am
I have an array of objects : const todos= [ { id:1, desc: "Do something" } , { id:1, desc: "Drink coffee" } , { id:1, desc: "Go for walk" } ] I want to display this list dynamically inside react JSX element return ( <div> /* And here, inside the div , I want <p> tags displaying desc of each object */ </div> ) How to do this in an easy way. Thank you in advance submitted by /u/HaveNoIdea20 [link] [comments]
- Help: I am an Admin in my Mac but I get Error: EACCES: permission denied, access '/usr/local/lib/node_modules' when trying to install Reactby /u/raulalexo99 (React – A JavaScript library for building user interfaces) on June 25, 2022 at 1:40 am
What can I do? The installation attempt was via npm submitted by /u/raulalexo99 [link] [comments]
- Hermes Intl Support in React Native on iOSby iROOMit Engineering (Reactnative on Medium) on June 24, 2022 at 9:58 pm
Hermes is the JavaScript engine written specifically for React Native. It boasts several performance improvements for React Native…Continue reading on Medium »
- Does anyone have any good examples of repositories to learn how to develop RN games for Android platforms?by /u/platynom (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 6:44 pm
I'm interested in creating a flappy bird clone, but the repos and guides I've found so far have been pretty specific to iOS and Android (mobile); I'm wanting to use a whole TV for a pet project. TIA submitted by /u/platynom [link] [comments]
- How to Develop Plugins for ReactJS Applicationsby /u/reactjs-India (React – A JavaScript library for building user interfaces) on June 24, 2022 at 2:49 pm
React allows developers to use individual parts of their application on both the client-side and the server-side, which speeds up the development process. In simple words, different developers can write individual parts, and any changes made will not affect the application's logic. You can also design it with the help of ReactJS plugin development for effective plugins for your websites. Let's look at how to create plugins for ReactJS applications. Read more: https://medium.com/@reactjsindia/how-to-develop-plugins-for-reactjs-applications-664116b02670 submitted by /u/reactjs-India [link] [comments]
- Tired of importing React into every component? Here's a quick tip on how to avoid itby /u/elrd5150 (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 2:45 pm
submitted by /u/elrd5150 [link] [comments]
- Cant use react navigation on react native 0.69by /u/chkml (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 2:37 pm
The install of react navigation library cause many conflicts. npx react-native init MyProject npm install u/react-navigation/native u/react-navigation/native-stack npm install react-native-screens react-native-safe-area-context npm install u/react-navigation/native-stack After install with --force, The metro fail with errors too. Tried init new project with 0.68 version but react-native-screens wont install Any idea? submitted by /u/chkml [link] [comments]
- React Native 0.69 is Out! Check Out the Exciting Featuresby /u/expertappdevs (React – A JavaScript library for building user interfaces) on June 24, 2022 at 2:19 pm
submitted by /u/expertappdevs [link] [comments]
- Using Local and Production ENV Variables in Expo React Nativeby Cormac Hayden (Reactnative on Medium) on June 24, 2022 at 1:48 pm
Expo recently came out with a new feature which makes managing ENVs a lot easier using what they call a dynamic app config file.Continue reading on Medium »
- Real time searching in google books api showing error of undefined is not a function.by /u/linux_terminal07 (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 12:41 pm
So, I am trying to show books title based on the search input from the google books api. My Text input code: <TextInputField placeholder="Search" value={search} onChangeText={(text)=>setSearch(text)} /> const [masterData, setMasterData] = useState([]); Code to load and fetch data on real time based on text input provided: //Conecting with server and fetching Books details from api const getBooksData = async () => { if(search.length > 0){ try { const response = await axios(`https://www.googleapis.com/books/v1/volumes?q=title:${search}&projection=lite&maxResults=6&filter=partial`); setMasterData(JSON.stringify(response.data)); console.log("Search - response data: ") }catch(err){ console.log("Search - " + err); } }; } useEffect(() => { getBooksData(search)}, [search]); The problem I am facing here is as soon as I start type something in my search bar, I get this error: err screen This is how I am trying to show data on screen: {!!masterData && masterData.map((item, uqid) => ( <View key={uqid}> <Text>{item.title}</Text> </View> ))} One thing I notice is that at the beginning there is no data in the masterData and as soon as I start typing something masterData is getting filled with various amount of data, so may be here we have to do something. submitted by /u/linux_terminal07 [link] [comments]
- React Native Custom Chrome Tab with hide URL and Sharing optionby /u/grtz-world (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 11:47 am
Hi everyone. I want to do custom web page display using react native custom chrome tab but it should not visible web page URL to customers and should disable sharing options as well. Do We have any such implementation for React Native? submitted by /u/grtz-world [link] [comments]
- How To Achieve Internationalization In React Nativeby Ketan kumar (Reactnative on Medium) on June 24, 2022 at 11:44 am
Internationalization is the process of designing and developing our software or mobile application product so it can be adapted and…Continue reading on JavaScript in Plain English »
- Build a Video Calling React Native App In 7 Steps With Video SDKby Sagar Kava (Reactnative on Medium) on June 24, 2022 at 11:18 am
Build a powerful react native video & audio calling app using video SDK. The solution that helps you build, scale, & innovate.Continue reading on Video SDK »
- With react-native-svg-charts I can't see the linechart on the screenby /u/NighthinkerCans (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 11:12 am
I'm trying to show graph in my screen. I took data from BLE and show but I can't make graph with my BLE values. I wrote graph code into Service component. Because, BLE values are within the characteristic value. I am giving some sample codes. Screen; https://preview.redd.it/sai6zb4ayj791.jpg?width=1080&format=pjpg&auto=webp&s=af2a7f0e5eba93577036ec64468a036b2aba528e This is my Service Component code; const granted = PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, { title: 'Permission Localisation Bluetooth', message: 'Requirement for Bluetooth', buttonNeutral: 'Later', buttonNegative: 'Cancel', buttonPositive: 'OK', } ); type ServiceCardProps = { service: Service; }; // eslint-disable-next-line @typescript-eslint/no-unused-vars const UART_SERVICE_UUID = '6E400001-B5A3-F393-E0A9-E50E24DCCA9E'.toLowerCase(); const data2 = [80, 10, 95, 48, 24, 67, 51, 12, 33, 0, 24, 20, 50]; const ServiceCard = ({ service }: ServiceCardProps) => { const [descriptors, setDescriptors] = useState<Descriptor[]>([]); const [characteristics, setCharacteristics] = useState<Characteristic[]>([]); const [data,setData] = useState<Characteristic[]>([]); const [areCharacteristicsVisible, setAreCharacteristicsVisible] = useState( false, ); useEffect(() => { const getCharacteristics = async () => { const newCharacteristics = await service.characteristics(); setCharacteristics(Object(newCharacteristics)); setData(Object(newCharacteristics)); newCharacteristics.forEach(async (characteristic) => { const newDescriptors = await characteristic.descriptors(); setDescriptors((prev) => [...new Set([...prev, ...newDescriptors])]); }); }; getCharacteristics(); }, [service]); return ( <View > <View style={styles.container} onLayout={() => { setAreCharacteristicsVisible((prev) => !prev); }}> <Text style={styles.container}>{`ECG`}</Text> </View> <View > {areCharacteristicsVisible && characteristics && characteristics.map((char) => ( <><CharacteristicCard key={char.id} char={char} /><LineChart style={{ height: 300 }} gridMin={0} gridMax={300} data={characteristics} svg={{ stroke: 'rgb(105, 105, 105)' }} contentInset={{ top: 0, bottom: 0 }}> </LineChart></> ))} </View> </View> ); }; const styles = StyleSheet.create({ container: { backgroundColor: 'white', marginBottom: 12, borderRadius: 16, shadowColor: 'rgba(60,64,67,0.3)', shadowOpacity: 0.4, shadowRadius: 10, elevation: 4, padding: 12, }, }); export { ServiceCard }; And Screen code; const DeviceScreen = ({ route, navigation, }: StackScreenProps<RootStackParamList, 'Device'>) => { // get the device object which was given through navigation params const { device } = route.params; const data2 = [80, 10, 95, 48, 24, 67, 51, 12, 33, 0, 24, 20, 50]; const [isConnected, setIsConnected] = useState(false); const [services, setServices] = useState<Service[]>([]); const [data, setData] = useState<Service[]>([]); // handle the device disconnection const disconnectDevice = useCallback(async () => { navigation.goBack(); const isDeviceConnected = await device.isConnected(); if (isDeviceConnected) { await device.cancelConnection(); navigation.navigate('Home'); } }, [device, navigation]); useEffect(() => { const getDeviceInformations = async () => { // connect to the device const connectedDevice = await device.connect(); setIsConnected(true); // discover all device services and characteristics const allServicesAndCharacteristics = await connectedDevice.discoverAllServicesAndCharacteristics(); // get the services only const discoveredServices = await allServicesAndCharacteristics.services(); setServices(discoveredServices); setData(discoveredServices); PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, { title: 'Permission Localisation Bluetooth', message: 'Requirement for Bluetooth', buttonNeutral: 'Later', buttonNegative: 'Cancel', buttonPositive: 'OK', } ); }; getDeviceInformations(); device.onDisconnected(() => { navigation.navigate('Home'); }); // give a callback to the useEffect to disconnect the device when we will leave the device screen return () => { disconnectDevice(); navigation.navigate('Home'); }; }, [device, disconnectDevice, navigation]); return ( <ScrollView contentContainerStyle={styles.container}> <TouchableOpacity style={styles.button} onPress={disconnectDevice}> <Text style={{fontFamily:"SairaExtraCondensed-Thin",textAlign:"center",fontSize:15,color:"white"}}>Antrenmanı Sonlandır</Text> </TouchableOpacity> <View> <View style={styles.header} > <Text>{`Name : ${device.name}`}</Text> <Text>{`Is connected : ${isConnected}`}</Text> </View> <View> {services && services.map((service) => <ServiceCard service={service} /> )} </View> </View> <View> </View> </ScrollView> ); }; I am trying solve this issue for a long time. What is the problem? Thanks submitted by /u/NighthinkerCans [link] [comments]
- react resolutionby /u/Dangerous_Word_1608 (React – A JavaScript library for building user interfaces) on June 24, 2022 at 10:57 am
Comment peut-on modifier la qualité du video en ReactJs pour qu'il s'accorde avec le device utilisté ?( smartphone 480px / tablette 720px...) submitted by /u/Dangerous_Word_1608 [link] [comments]
- How to Prepare your React Native App for iOS 15 and Android 12?by /u/expertappdevs (React – A JavaScript library for building user interfaces) on June 24, 2022 at 10:48 am
submitted by /u/expertappdevs [link] [comments]
- How to Implement Face ID and Touch ID to React Native App?by /u/expertappdevs (React – A JavaScript library for building user interfaces) on June 24, 2022 at 10:46 am
submitted by /u/expertappdevs [link] [comments]
- Invalid regular expression: Quantifier has nothing to repeatby Lee young-jun (Reactnative on Medium) on June 24, 2022 at 10:45 am
KickGoing app can’t display ‘update’ button in ‘settings’ screen without inserting a new version in the administrator site.Continue reading on Medium »
- Stackoverflow usage style?by /u/starttroopa47 (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 10:07 am
Purpose of this poll: To understand the segments of different use behaviors. I personally do not have an account yet, but heavily use Stackoverflow, so wondering about y’all. You are a: View Poll submitted by /u/starttroopa47 [link] [comments]
- Properly typing route.params in custom bottom tab barby /u/Pfinferno (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 8:50 am
Been struggling with this for a few days and haven't gotten an answer from other places. Just upgraded react-navigation from v4 to v6 and I am trying to type all the nav stuff properly. I cannot type route.params for a bottom tab navigator. For example, I have the navigator and params type like this: export type BottomTabParamList = { ListScreen: { i18nKey: string }; DetailsScreen: { i18nKey: string }; OptionsStackNavigator: { i18nKey: string }; }; const MainAppBottomTabs = createBottomTabNavigator<BottomTabParamList>(); I am using a custom tab bar component for this. In that tab bar component, I am combining another type (for some redux props) with BottomTabBarProps. I then use .map which uses the nav state: type ScreenProps = BottomTabBarProps & { reduxProp1: number; reduxProp2: number; }; // this is inside my render for my custom tab bar. I'm using .map to create a custom pressable for each "tab" // route is typed as NavigationRoute<ParamListBase, string> return state.routes.map((route, index) => { const { i18nKey } = route.params; // issue here // rest of code It is saying i18nKey doesn't exist on type {}. How can I get it to recognize the type correctly? submitted by /u/Pfinferno [link] [comments]
- Learn to integrate Login via Facebook using Huawei Auth Service (React Native)by HMS Community (Reactnative on Medium) on June 24, 2022 at 7:09 am
IntroductionContinue reading on Medium »
- Mui date picker keeps attaching timeby /u/funkydude321 (React – A JavaScript library for building user interfaces) on June 24, 2022 at 6:22 am
hi, im using the date picker module but my flask api keeps returning Incorrect date value: '2022-06-22T06:13:50.000Z' whenever i submit the date i was able to use inputFormat to change the date format to 'yyyy/MM/dd' but i can seem to remove the time that comes attached with it, any idea on how i can fix this? i thought maybe i can strip the string after for everything after "T" but that returns "e.replace is not a function" submitted by /u/funkydude321 [link] [comments]
- Can a lot of styled components slow down an application?by /u/coreyisnew (React – A JavaScript library for building user interfaces) on June 24, 2022 at 5:01 am
Made some application using styled component and it allows users to create modals and each modal has its own styled components and have different styles due to the fact that the user can change the shape, color and content dynamically. I noticed that more 650 lines of css can be added by the user for 6 modals when the user can add as much as 100 new modals. Can this be a performance bottleneck in the future? submitted by /u/coreyisnew [link] [comments]
- Looking for book suggestionsby /u/celeb0rn (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 3:33 am
I'm a fairly experienced dev with React Native. I've worked with production apps since 2018 (which in a lot of frameworks is young.. but in RN world.. is quite some time). I'm always wanting learn and improve more. Are there any books you can suggest that would help, I'm looking for stuff past the tutorial 'getting started with React Native etc...'. Anything more advanced on architecture, patterns, etc. submitted by /u/celeb0rn [link] [comments]
- Push data from React native app to Facebook group & WP websiteby /u/thundergirl27 (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 3:17 am
Hi, Is there a way to push data from a react native app to a Wordpress website and Facebook group? The data is mainly related to new work gigs, job openings that are updated on the app. Thank you submitted by /u/thundergirl27 [link] [comments]
- When a Existing App didn’t Run on Androidby aybikebilgili (Reactnative on Medium) on June 24, 2022 at 2:30 am
Sometimes we get an existing application by various platform. Such as GitHub, weTransfer, mail… Maybe it is a zip, a rar document or etc…Continue reading on Medium »
- Debug Device Without Shaking (React Native)by aybikebilgili (Reactnative on Medium) on June 24, 2022 at 1:09 am
While programming the mobile app, it can need to shake the device sometimes. For example, you need to open developer menu, to debug your…Continue reading on Medium »
- programmatic background screen-recording for university studyby /u/Feeling-Challenge-71 (React Native - Building Native Mobile Apps w/JavaScript) on June 24, 2022 at 12:51 am
Hi, I study at University of Waterloo. We are trying to create an EDA (epidermal activity)/stress monitoring app for Schizophrenic patients. We were wondering if there is a way to take screenshots of there phone activity and upload it to a server in the background. We trying to build an AI model to predict when they have there episodes of chaos and mental confusion. submitted by /u/Feeling-Challenge-71 [link] [comments]
- React Native and GameDev are compatible?by /u/o-kawaii (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 11:03 pm
Hello! I'm a react native developer and I'm trying to get into gamedev, but I don't like large engines like Unity and I would like to use my RN experience somehow. So I am thinking about to use Pixi.js or react-native-game-engine. It is worth to say that I want to make not simple 2D platformers, but rather an economic strategy with a small amount of 3D or even 2D. And I think my biggest concern is performance...What do you think? Upd. I was hoping someone would comment, not just vote on a poll and downvote the topic... View Poll submitted by /u/o-kawaii [link] [comments]
- US phone verification tutorialby Alfonso Cabral (Reactnative on Medium) on June 23, 2022 at 10:43 pm
This tutorial will give you a basic idea of how to implement US phone number verification using SkipAuth API available through rapidapi.comContinue reading on Medium »
- How does React Native handle 2d animations?by /u/No-Celebration-8776 (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 9:21 pm
Looking to make a trading card game on mobile that has non-intensive card animations and some possible 2d effects/animations. Nothing out of this world but something I would want to look smooth and clean. Could React Native handle this or make it work? I know people have issues when creating games on mobile but a lot of the time they want 3d graphics. submitted by /u/No-Celebration-8776 [link] [comments]
- Is it possible to get cookies from a url with same site strict from React Native app?by /u/Lekowski (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 9:17 pm
Is it possible to get cookies from a url with same site strict from React Native app? submitted by /u/Lekowski [link] [comments]
- Is there a React Native equivalent to NextJS or NUXT?by /u/MadThad762 (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 6:15 pm
Hi everyone, I’ve never used React Native but I’m familiar with React/NextJS. Does React Native have any frameworks like NextJS for React? What’s the best tool for starting a project? submitted by /u/MadThad762 [link] [comments]
- Bumping the specifity in styled components?by /u/coreyisnew (React – A JavaScript library for building user interfaces) on June 23, 2022 at 5:25 pm
/* my-component.css */ .red-bg.red-bg { background-color: red; } https://styled-components.com/docs/advanced I have no idea what they mean, why did are they typing the selector twice? What the hell? I have an issue where I am wrapping a styled component with the same styled component with different props, and I think it's caused by a bug they didn't want to fix regarding specifity. I see a Github issue ticket that was closed by them even though people were having lots of issues. submitted by /u/coreyisnew [link] [comments]
- Can i integrate google assistant, siri capabilities with an app built with React Nativeby /u/eltinto (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 4:23 pm
submitted by /u/eltinto [link] [comments]
- Update an object in an array based on previous stateby /u/randsom1 (React – A JavaScript library for building user interfaces) on June 23, 2022 at 4:14 pm
The below code successfully adds the first item object to the cart array (first if) and adds a new object to the cart array while maintaining the previous state of the array (second else). I cannot figure out how to update the state of the cart array for one object (an object that exists in the cart array already, but needs the quantity changed) and return all the objects previously in the array alongside the single modified object. I've tried many iterations of the section but cannot return the correct cart array. const cartAddHandler = () => { if (cartItems.length === 0) { setCartItems([{ id: variantId, quantity: 1 }]); } else { if ( cartItems.some((item) => { return item.id === variantId; }) ) { console.log("Add one to quantity of this specific variant") } else { setCartItems((previousItems) => { return [{ id: variantId, quantity: 1 }, ...previousItems]; }); } } }; Thank you to u/Tool-Cool and u/code_moar! Here was the code that ended up working, the map suggestion was spot on. const cartAddHandler = () => { if (cartItems.length === 0) { setCartItems([{ id: variantId, quantity: 1 }]); } else { if ( cartItems.some((item) => { return item.id === variantId; }) ) { setCartItems((previousItems) => previousItems.map((item) => { if (item.id === variantId) { return { id: variantId, quantity: item.quantity + 1 }; } else { return item; } }) ); } else { setCartItems((previousItems) => { return [{ id: variantId, quantity: 1 }, ...previousItems]; }); } } }; submitted by /u/randsom1 [link] [comments]
- Switching between screens in React Native leading to inconsistent databy /u/srivsaks (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 1:52 pm
Hello,I am building a small ecommerce android app using React Native. This App has three tabs:HomeProfileOrders The implementation is such that when i open the App the Home screen loads , it makes an API call to fetch some user details and then these are stored in a cache. These user details will be used throughout the App. In Orders screen this data is being used to fetch the orders placed by the user. But the issue that i am facing is that if i open my App and i quickly jump to Orders screen , i am unable to get the orders placed by the user because i jumped quickly and because of which API call didnt get complete and hence no data in the cache. Can anyone suggest me how can i go about fixing this issue? submitted by /u/srivsaks [link] [comments]
- Can anyone help me finding a way to create that green check mark with the tilted view on the top right corner?by /u/quadrified (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 12:51 pm
submitted by /u/quadrified [link] [comments]
- How long will it take to convert a medium-sized react Native android app to a pWA?by /u/psychemerchant (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 12:45 pm
This requirement was floated at work. The idea was to enable someone to try the app without installing it. I understand that React Native uses native text and UI elements, and I'm wondering how all that code can be ported to a web browser. Particularly, how long that will take, on average. The app connects to a backend and performs CRUD operations on 3-4 models, has accounts, auth (with OTP), camera access to set profile pictures etc. (Trying to list things that could significantly affect the duration) Assume that we have a team of 2 developers. Thanks in advance. submitted by /u/psychemerchant [link] [comments]
- Marker on maps with more than 1 colourby /u/GorgieRules1874 (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 12:28 pm
In a map that I’ve got on my app, I’ve got a series of different markers for specific locations. Some have colours of red, blue, white, etc. Is it possible to have 2 colours on one marker? So one half of the marker could be white and the other half could be black? submitted by /u/GorgieRules1874 [link] [comments]
- Expo app - react native crashesby /u/fit--nerd (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 11:55 am
I am new to react native, i started using expo snack to develop small apps. I did a focusing timer app, the app worked fine on ios emulator that is in the browser, on web output snack and on my iPad using expo go app but when i tried testing on android emulator on snack and on my Android device, the expo app crashes, it outs the logo and closes. I have to point out that no errors of code were shown in the log and the app serves its purpose correctly. Is anyone experiencing this issue or knows a solution? submitted by /u/fit--nerd [link] [comments]
- How to set default app in expoby /u/iamtheretronerd (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 11:04 am
Hi I’m developing a custom android launcher in expo and I’m not able to find how i set my app as default home screen since i cannot access android manifest file I don’t want to detach my app submitted by /u/iamtheretronerd [link] [comments]
- Looking for a lightweight library that can render a graph like this…by /u/workworkworkwork89 (React – A JavaScript library for building user interfaces) on June 23, 2022 at 11:03 am
submitted by /u/workworkworkwork89 [link] [comments]
- Announcing React Native 0.69 · React Nativeby /u/sebastienlorber (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 9:24 am
submitted by /u/sebastienlorber [link] [comments]
- Thoughts on React native 0.69by /u/manoleee (React Native - Building Native Mobile Apps w/JavaScript) on June 23, 2022 at 8:04 am
Has it fixed anything on your project ? Was it easy to migrate ? Do you like the 69 innuendo ? submitted by /u/manoleee [link] [comments]
- my polymer ide is unable to analyze my jsx files or main app.js fileby /u/thatboylank (React – A JavaScript library for building user interfaces) on June 23, 2022 at 7:43 am
this is my first ever react app am following a simple tutorial. and for some reason i keep getting errors for every jsx file i create although the tutorial am following doesn't have them although we have matching codes i installed yarn and npm and sass although npm has 6 vulnerabilities. and fixing them using the fix force code on the terminal always creates more errors and i have been going along the tutorial very slow might i add and everything compiles but am working as an intern and my boss is expecting to see my work soon and i cant show him anything with errors . please help sorry for the weird question format and thanks for help in advance. error code below Document not found: src/components/navbar/navbar.jsx polymer-ide(unable-to-analyze) [ln1, col1] screan shot for the visual code studio problem tab with my app.js open submitted by /u/thatboylank [link] [comments]
- How do you pick the best text color given a background color?by /u/coreyisnew (React – A JavaScript library for building user interfaces) on June 23, 2022 at 12:26 am
I am allowing users to choose a background color, but I need to adjust the text color, because otherwise, the background color will make it impossible to read. Is there a custom function or a library that allows you to do this? Let's say the background is yellow, the text color should be black or a similar color, because if you choose pink, it's going to be hard to read. submitted by /u/coreyisnew [link] [comments]
- Best Practicesby /u/TensionCoding (React – A JavaScript library for building user interfaces) on June 22, 2022 at 10:03 pm
My team and I are discussing what is the best practice for structuring a React app. We are trying to setup a uniform structure to share between us for future projects. When using technologies like Nextjs or Redux it becomes more clear, but for a standard project there is a lot of flexibility. I have been unable to find anything that is definitively best practice. submitted by /u/TensionCoding [link] [comments]
- Mern Stack Social media app. Adding and reading posts completed till now.by /u/Manav_Dixit (React – A JavaScript library for building user interfaces) on June 22, 2022 at 3:44 pm
submitted by /u/Manav_Dixit [link] [comments]
- App Developers are actual geniuses.by /u/Chaddersatz (React Native - Building Native Mobile Apps w/JavaScript) on June 22, 2022 at 12:35 pm
For TL;DR, skip to the bold at the bottom. So apparently, working in mobile development is kinda an un-thanked and undervalued job sometimes so I'm just here to say that I am in absolute awe of what you guys do. Absolute stinking awe. I studied design at university in the UK, and work freelance in the film industry (behind the scenes) but in February of this year, I decided I wanted to make an app to help automate an annoying part of my job. I figured learning to code would be like learning a peice of design software. I've always been good with computers and teaching myself stuff, so I thought if I knucked down with Google for 30 days I'd be able to cobble a working prototype by the end of it. I'm literally laughing rn at how ignorant I was. But I'm hooked? I'm actively turning down work and living on 50p cup noodles in a country on the brink of recession so I can learn to do something I find insanely hard. Where did you pick all this up? When did you find the time to learn all of these things? What were your first projects? I am astounded by just how much there is to learn. React Native? Sorry bud, make sure you learn React first. React? Oh, make sure you've got to grips with Javascript before you try that. Javascript? Hold your horses, have you ever used HTML? CSS? Wait, did you install VS Code? ...CodePen? Just layers and layers of stuff to learn. Pages and pages of docs to read. It's been about 5 months and I've finally reached the stage where stuff has started to click and I think I can start learning React Native. I just had to set up my VM/ developer environment and is2g I was almost sick trying to configure Android Studio. So from someone who 5 months ago couldnt write a lick of code and had no idea how difficult it was to develop an app: Thank you. You guys are brilliant. This is some big brain shit. Thank you for all the guides you write, the open-source code you post, the videos you upload and the apps you make for devices we all use. Amazing. If any of you app messiahs have any pointers or tips for learning RN and mob dev in general, they would be greatfully recieved. EDIT: Accidentally published this before it was finished, which doesn't bode well for my computing ability but there we are. Sorry the title is a bit cringe and I would have thought of something better, but it's still true so I'll stand by it. submitted by /u/Chaddersatz [link] [comments]
- I've made my app's search fast and open-sourced the solutionby /u/astoilkov (React – A JavaScript library for building user interfaces) on June 22, 2022 at 11:47 am
submitted by /u/astoilkov [link] [comments]
- I would love to get a critique on a platform I created with react jsby /u/Alert-Ad-5918 (React – A JavaScript library for building user interfaces) on June 22, 2022 at 9:10 am
I spent 3 years working on MyMiix. So far it's been all on my own and would love some critique. https://mymiix.com you can use the test account which is email: [guest@gmail.com](mailto:guest@gmail.com) password: password submitted by /u/Alert-Ad-5918 [link] [comments]
- Hello Members of r/Reactby /u/GennaroIsGod (React – A JavaScript library for building user interfaces) on January 15, 2021 at 7:58 pm
Theres a new mod in town https://preview.redd.it/xl5wie2exjb61.png?width=220&format=png&auto=webp&s=19367d879f21bf1bd3ef3c2825b8b3568f10b84e Seems as though this sub has gone a little bit without a mod and it seems like it's done pretty well for the most part. But since we're at this point are there any changes about the sub you'd like to see? Hope to interact with all of you 🙂 submitted by /u/GennaroIsGod [link] [comments]