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
// Expo SDK41 | |
// expo-blur: ~9.0.3 | |
import React, { useRef } from 'react'; | |
import { | |
Animated, | |
Image, | |
ImageBackground, | |
ScrollView, | |
StatusBar, |
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
// Expo SDK40 | |
// expo-blur: ~8.2.2 | |
// expo-haptics: ~8.4.0 | |
// react-native-gesture-handler: ~1.8.0 | |
// react-native-reanimated: ^2.0.0-rc.0 | |
// react-native-safe-area-context: 3.1.9 | |
import React, { useState } from 'react'; | |
import { | |
Image, |
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, { useRef } from 'react'; | |
import { | |
Animated, | |
Image, | |
PanResponder, | |
useWindowDimensions, | |
} from 'react-native'; | |
const IMAGE_URI = | |
'https://vignette.wikia.nocookie.net/joke-battles/images/4/40/18360-doge-doge-simple.jpg/revision/latest?cb=20151209161638'; |
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, { | |
useEffect, | |
useRef, | |
useState, | |
} from 'react'; | |
import { | |
Animated, | |
Button, | |
Text, |
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
// -- Cibler des éléments | |
// Comment cibler des éléments principaux ? | |
const head = document.head; | |
const body = document.body; | |
// Comment cicler des éléments par balise/tag HTML ? | |
// <div> | |
// <p>...</p> | |
// <p>...</p> |
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 initialState = { name: '' }; | |
function reducer(state = initialState, action) { | |
switch (action.type) { | |
case 'CHANGE_NAME': | |
return { ...state, name: action.value }; | |
} | |
} | |
const action = { |
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 from "react"; | |
import Container from "react-bootstrap/Container"; | |
import Row from "react-bootstrap/Row"; | |
import Col from "react-bootstrap/Col"; | |
import Image from "react-bootstrap/Image"; | |
import "bootstrap/dist/css/bootstrap.min.css"; | |
import "./App.css"; | |
function App() { | |
return ( |
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
module.exports = { | |
algo(input) { | |
const groups = []; | |
let currentGroup = ''; | |
for (const letter of input.split('')) { | |
if (letter !== currentGroup.charAt(currentGroup.length - 1)) { | |
groups.push(currentGroup); | |
currentGroup = ''; | |
} |
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
// Grouped data can be structured in two different ways: | |
// - as a list: | |
const chris = [ | |
'Christine', | |
'?', | |
'Ireland', | |
]; | |
console.log(chris[0]); | |
// - as an object: |
NewerOlder