This file contains 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
version: '3' | |
services: | |
jenkins: | |
image: jenkins/jenkins:latest | |
restart: always | |
ports: | |
- 1112:8080 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- /usr/bin/docker:/usr/bin/docker |
This file contains 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 OtherComponent = React.lazy(() => import('./OtherComponent')); | |
function MyComponent() { | |
return ( | |
<div> | |
<Suspense fallback={<div>Loading...</div>}> | |
<OtherComponent /> | |
</Suspense> | |
</div> | |
); |
This file contains 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 OtherComponent = React.lazy(() => import('./OtherComponent')); | |
function MyComponent() { | |
return ( | |
<div> | |
<OtherComponent /> | |
</div> | |
); | |
} |
This file contains 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 OtherComponent from './OtherComponent'; | |
function MyComponent() { | |
return ( | |
<div> | |
<OtherComponent /> | |
</div> | |
); | |
} |
This file contains 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
async testFeed() { | |
const token = await AsyncStorage.getItem("token") | |
axios.get('http://demo.com/api/v1/feed', | |
{ headers: { 'x-access-token': token } }) | |
.then(response => { | |
const result = response.data.result | |
console.log(result) | |
}) | |
.catch(error => { | |
console.log(error); |
This file contains 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 {httpClient} from './HttpClient' | |
.... | |
httpClient | |
.get('/feed') | |
.then(result=>{ | |
Alert.alert(JSON.stringify(result.data)) | |
}) |
This file contains 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'; | |
import { AsyncStorage } from 'react-native'; | |
import axios from 'axios' | |
import join from 'url-join' | |
axios.interceptors.request.use(async (config)=> { | |
const jwtToken = await AsyncStorage.getItem("token") | |
if (jwtToken != null) { |
This file contains 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 InputData extends Component { | |
render() { | |
return( | |
<div className="panel-footer"> | |
<div className="input-group"> | |
<input id="btn-input" type="text" className="form-control input-sm" placeholder="Type your message here..." /> | |
<span className="input-group-btn"> |