- View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
- View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
- HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
- String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti
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
Show hidden characters
{ | |
"parser": "babel-eslint", | |
"extends": ["airbnb", "plugin:react-native/all"], | |
"plugins": ["react-native", "jsx-a11y", "import"], | |
"env": { | |
"jest": true | |
}, | |
"rules": { | |
"react-jsx-filename-extension": [ | |
"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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Hello Word with React!</title> | |
</head> | |
<body> | |
<div id="app"></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
@PutMapping(value="/{id}") | |
public Product updateProductWithId(@PathVariable Long id, Product product) { | |
Product currentProduct = productDAO.findOne(id); | |
currentProduct.setCode(product.getCode()); | |
currentProduct.setDescription(product.getDescription()); | |
currentProduct.setUnitPrice(product.getUnitPrice()); | |
return productDAO.save(product); | |
} |
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 { View, Text, Button } from 'react-native'; | |
import firebase from 'firebase'; | |
export default class App extends Component { | |
constructor(props){ | |
super(props); | |
this.state = { pontuacao: '' } | |
} |
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 { | |
ScrollView | |
} from 'react-native'; | |
import axios from 'axios'; | |
import Items from './Items'; | |
export default class ListItems extends Component { | |
constructor(props) { |
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
// Clico de vida de um componente | |
// 1 | |
constructor(props) { | |
super(props); | |
console.log('contruindo a aplicação'); | |
} | |
//2 | |
componentWillMount() { |
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
ERROR watchman --no-pretty get-sockname returned with exit code=null, signal=SIGABRT, stderr= 2017-08-18T12:22:25,828: [cli] Failed to open /Users/srdim/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Not a directory | |
Error: watchman --no-pretty get-sockname returned with exit code=null, signal=SIGABRT, stderr= 2017-08-18T12:22:25,828: [cli] Failed to open /Users/srdim/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Not a directory | |
at ChildProcess.<anonymous> (/Users/srdim/mobile_apps/bobapp/node_modules/metro-bundler/node_modules/sane/node_modules/fb-watchman/index.js:198:18) | |
at emitTwo (events.js:106:13) | |
at ChildProcess.emit (events.js:191:7) | |
at maybeClose (internal/child_process.js:891:16) | |
at Socket.<anonymous> (internal/child_process.js:342:11) | |
at emitOne (events.js:96:13) |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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
def params_vehicle | |
params.require(:vehicle).permit( | |
:name, | |
:vehicle_type, | |
:national, | |
:country, | |
:state, | |
:url, | |
:address, | |
publication_day: [] |