Same stylesheet for react js and react-native

Do we have a typical template which we can use crosswise over respond js and respond local? 

On the off chance that we characterize a styling then we should have the capacity to using it crosswise over respond js and respond local.
const style = StyleSheet.create({
    fontStyle: {
       fontSize: 20, //in web usually we give 20px and in react-native we give 20
       fontWeight: 'bold'
    }
});

fontSize is one thing which differs react js and react-native like that there are many things. Do we have any unified approach of styling which can be used across.


3 Replies

SS Selvamani Sankarappan Syncfusion Team April 17, 2018 10:26 AM UTC

Hi Bargavi, 
 
Thanks for contacting Syncfusion support. 
 
You can use the same styles for both react and react-native. Please refer to the following reference links: 
 
If the above does not meet your requirement, kindly let us know with more details to provide an appropriate solution at the earliest. 
 
Regards, 
 
Selvamani S. 



RD reactjs development replied to Bargavi kalla June 7, 2018 01:44 PM UTC

Do we have a typical template which we can use crosswise over respond js and respond local? 

On the off chance that we characterize a styling then we should have the capacity to using it crosswise over respond js and respond local.
const style = StyleSheet.create({
    fontStyle: {
       fontSize: 20, //in web usually we give 20px and in react-native we give 20
       fontWeight: 'bold'
    }
});

fontSize is one thing which differs react js and react-native like that there are many things. Do we have any unified approach of styling which can be used across.


thanks for the queries.
<quote>Do we have a typical template which we can use crosswise over respond react js and respond local? 

On the off chance that we characterize a styling then we should have the capacity to using it crosswise over respond js and respond local.
const style = StyleSheet.create({
    fontStyle: {
       fontSize: 20, //in web usually we give 20px and in react-native we give 20
       fontWeight: 'bold'
    }
});

fontSize is one thing which differs react js and react-native like that there are many things. Do we have any unified approach of styling which can be used across.</quote>



AP Arun Palaniyandi Syncfusion Team June 8, 2018 12:41 PM UTC

Hi Bargavi,  
  
Thanks for your update. 
 
Please let us know if you have any queries in future. 
 
Regards, 
Arun P. 


Loader.
Up arrow icon