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
| <form> | |
| <p>Seu Nome:</p> | |
| <input type="text" id="nome"> | |
| </form> |
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
| <form> | |
| <label for="nome">Seu Nome:</label> | |
| <input type="text" id="nome" /> | |
| </form> |
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
| export const Input = (props) => { | |
| const { name, label, ...othersProps } = props | |
| return( | |
| <div> | |
| <label htmlFor={name}>{label}</label> | |
| <input name={name} id={name} {...othersProps} /> | |
| </div> | |
| ) | |
| } |
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 { Input } from './Input'; | |
| export default class Form extends React.Component { | |
| state = { | |
| nome: '', | |
| idade: '', | |
| } | |
| onChangeHandler = (event) => { |
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
| <button aria-label="Fechar Modal">X</button> |
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
| <img src="image.jpg" alt="Deficientes visuais acessando a internet" /> |
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 triggerDispatchs = action => { | |
| const dispatchs = [counterDispatch, authDispatch]; | |
| for (let i = 0; i < dispatchs.length; i++) { | |
| dispatchs[i](action); | |
| } | |
| }; | |
| const middlewareContrutor = action => { | |
| middleware(action)(triggerDispatchs); | |
| }; |
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"; | |
| export const initialState = { | |
| store: {}, | |
| dispatch: () => {} | |
| }; | |
| const Context = React.createContext(initialState); | |
| export default Context; |
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 Context from "./Config"; | |
| const Connect = Component => { | |
| return props => ( | |
| <Context.Consumer> | |
| {({ dispatch, store }) => { | |
| return <Component {...store} dispatch={dispatch} />; | |
| }} | |
| </Context.Consumer> |
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 ReactDOM from "react-dom"; | |
| import App from "./App"; | |
| import Store from "./Store/provider"; | |
| ReactDOM.render( | |
| <Store> | |
| <App /> | |
| </Store>, | |
| document.getElementById("root") |