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 MyUserSelectableList = ({ users ) => { | |
const { onRowCheck, isRowSelected } = useSelectedRows(); | |
return ( | |
<> | |
{users.map(user => ( | |
<> | |
<Checkbox value={isRowSelected(user)} onChange={(value) => onRowCheck(user, value)} /> | |
<span>{user.name}</span> | |
</> |
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 { Switch, Route } from 'react-router-dom'; | |
const PAGES = [ | |
{ | |
name: 'Home', | |
path: '/', | |
loader: './pages/Home', | |
}, | |
]; |
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
function login() { | |
// login logic here | |
} | |
class LoginForm extends React.PureComponent { | |
render() { | |
return ( | |
<form onSubmit={login}> | |
<input type="email" /><br /> | |
<input type="password" /><br /> |
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
let tags: [String] = ["vNome", "vLocal", "vData", "vEquipe", "vAmigos", "vReferencia"] | |
for tag in tags { | |
form.rowByTag(tag)?.disabled = true | |
form.rowByTag(tag)?.evaluateDisabled() | |
} |
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
form.rowByTag("vNome")?.disabled = true | |
form.rowByTag("vNome")?.evaluateDisabled() | |
form.rowByTag("vLocal")?.disabled = true | |
form.rowByTag("vLocal")?.evaluateDisabled() | |
form.rowByTag("vData")?.disabled = true | |
form.rowByTag("vData")?.evaluateDisabled() | |
form.rowByTag("vEquipe")?.disabled = true | |
form.rowByTag("vEquipe")?.evaluateDisabled() | |
form.rowByTag("vAmigos")?.disabled = true | |
form.rowByTag("vAmigos")?.evaluateDisabled() |
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 from 'react' | |
import classNames from 'classnames' | |
import styles from './styles.module.scss' | |
export default ({ negative = false, name, surname }) => ( | |
<div | |
className={classNames( | |
styles['name-container'], | |
negative && styles['name-negative'], |
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
{ | |
test: /(?<!\.module)\.scss$/, | |
use: [ | |
require.resolve('style-loader'), | |
{ | |
loader: require.resolve('css-loader'), | |
options: { | |
importLoaders: 1, | |
}, | |
}, |
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 from 'react' | |
import store from './store' | |
import { Provider } from 'react-redux' | |
import Main from '@/views' | |
export default () => ( | |
<Provider | |
store={store} |
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 from 'react' | |
import { | |
BrowserRouter, | |
Route, | |
} from 'react-router-dom' | |
import Home from './Home' | |
import Settings from './Settings' | |
export default () => ( |
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 { createStore, applyMiddleware } from 'redux' | |
import createSagaMiddleware from 'redux-saga' | |
import loggerMiddleware from 'redux-logger' | |
import combinedReducer from 'src/store/reducers' | |
import rootSaga from 'src/store/sagas' | |
const sagaMiddleware = createSagaMiddleware() | |
sagaMiddleware.run(rootSaga) |