- Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
- Opcional: Si usamos Fetch API en el proyecto:
| // Instalar react-navigation/native | |
| npm install @react-navigation/native | |
| // Instalar las dependencias | |
| npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view | |
| // Instalar navegación en Stack | |
| npm i @react-navigation/stack |
| const stat = require('fs').statSync; | |
| const AdmZip = require('adm-zip'); | |
| /** | |
| * Example usage | |
| */ | |
| newArchive(`test-${+new Date}.zip`, [ | |
| 'index.js', | |
| 'package.json', | |
| 'node_modules' |
| {{-- You do not need to add this component if you are using the permanent option in the head component --}} | |
| <script> | |
| if (!window.sessionTimerPermanent && window.Livewire) { | |
| window.livewire.hook('afterDomUpdate', startSessionTimer) | |
| } | |
| // if you are on livewire > 1.3.1 and want to avoid the default error alert | |
| // https://github.com/livewire/livewire/pull/1146 | |
| window.livewire.onError(statusCode => { | |
| if (statusCode === 419) { |
| import Reader from './Reader'; | |
| import Target from './Target'; | |
| /** | |
| * This is default annotation property for automatic type casting: | |
| * <code> | |
| * @Annotation({ some: any }) | |
| * // => will be casts "as is" {some: any} | |
| * | |
| * @Annotation("any") |
| import React from 'react' | |
| import axios, { post } from 'axios'; | |
| class SimpleReactFileUpload extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state ={ | |
| file:null | |
| } |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <phpunit backupGlobals="false" | |
| backupStaticAttributes="false" | |
| bootstrap="bootstrap/autoload.php" | |
| colors="true" | |
| convertErrorsToExceptions="true" | |
| convertNoticesToExceptions="true" | |
| convertWarningsToExceptions="true" | |
| processIsolation="false" | |
| stopOnFailure="false"> |
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| //CSS | |