For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
The first step is to use the Expo CLI to initialize the project. If you don't have the latest version of the Expo CLI tool, (or you don't have it installed) run npm install -g expo-cli.
Now run the following commands in the same order:
expo init my-app -t expo-template-blank-typescriptnpx install-peerdeps --dev eslint-config-airbnbnpm i --save-dev @typescript-eslint/parser @typescript-eslint/eslint-pluginnpm i --save-dev prettier eslint-config-prettier eslint-plugin-prettier
Create or edit the file .eslintrc.json with the following content:
So, you just cloned an existing project's repo and you run bundle install but you got the error: rbenv: version x.x.x is not installed....
What the issue means? The project uses a specific ruby version that you do not have on your system.
Here's how to fix it:
- Install the Ruby build for the specified version using:
rbenv install x.x.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from 'axios'; | |
| import { USER_NAME, PASSWORD, REST_END_POINT } from './ApiConstants'; | |
| function baseAxios(options) { | |
| const defaultHeaders = { | |
| 'Content-Type': 'application/json', | |
| 'Accept-Language': options.language ? options.language : 'en', | |
| 'lang': options.lang ? options.lang : 'en', | |
| username: USER_NAME, | |
| password: PASSWORD, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const widthPercentageToDP = widthPercent => { | |
| const screenWidth = Dimensions.get('window').width; | |
| const elemWidth = parseFloat(widthPercent); | |
| return PixelRatio.roundToNearestPixel(screenWidth * elemWidth / 100); | |
| }; | |
| const heightPercentageToDP = heightPercent => { | |
| const screenHeight = Dimensions.get('window').height; | |
| const elemHeight = parseFloat(heightPercent); | |
| return PixelRatio.roundToNearestPixel(screenHeight * elemHeight / 100); | |
| }; |
In your command-line run the following commands:
brew doctorbrew update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| import { | |
| SafeAreaView, | |
| View, | |
| Animated, | |
| TouchableOpacity, | |
| Text | |
| } from 'react-native'; | |
| const App = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| import { | |
| SafeAreaView, | |
| View, | |
| Animated, | |
| TouchableOpacity, | |
| Text | |
| } from 'react-native'; | |
| const App = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const redis = require("redis"); | |
| const redis_url = process.env.REDIS_URL || null; | |
| const client = redis.createClient(redis_url); | |
| module.exports = { | |
| getCached: (req, res, next) => { | |
| const { redis_key } = req.headers | |
| client.get(redis_key, function(err, reply) { | |
| if (err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| class App extends Component { | |
| state = { | |
| wars: [], | |
| } | |
| componentDidMount() { | |
| fetch('https://swapi.co/api/people') |
NewerOlder