- Deadline: 3/17 中午 12:00
- 把檔案寄至 chentsulin@gmail.com,標題寫 [作業二/ 電機X XXX] (如果你已經會用 github 也可以寄 repo 連結過來)
Chat Room Application
- Deadline: 10/22 中午 12:00
- 把檔案寄至 chentsulin@gmail.com,標題寫 [作業三/ 電機X XXX] (如果你已經會用 github 也可以寄 repo 連結過來)
Calculator App
依照提供的檔案進行修改 (https://github.com/web-seminar/calculator)
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
client.sendImagemap(userId, 'Re: [問卦] 齊柏林導演的故事給了我們什麼啟示?', { | |
baseWidth: 1040, | |
baseHeight: 720, | |
baseUrl: 'https://our.image.com/server/path', | |
actions: [ | |
{ | |
type: 'uri', | |
linkUri: 'https://www.ptt.cc/bbs/Gossiping/M.1497100764.A.C81.html', | |
area: { | |
x: 0, |
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 App = () => { | |
const [name, setName] = useState(''); | |
const [email, setEmail] = useState(''); | |
const handleNameChange = event => { | |
setName(event.target.value); | |
}; | |
const handleEmailChange = event => { | |
setEmail(event.target.value); | |
}; |
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 App = () => { | |
const theme = useContext(ThemeContext); | |
const locale = useContext(LocaleContext); | |
return ( | |
<div className={theme}> | |
{locale} | |
</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
const App = () => { | |
return ( | |
<ThemeContext.Consumer> | |
{theme => ( | |
<LocaleContext.Consumer> | |
{locale => ( | |
<div className={theme}> | |
{locale} | |
</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
class App extends Component { | |
componentDidMount() { | |
this.subscribe(this.props.userId); | |
} | |
componentDidUpdate(prevProps) { | |
if (this.props.userId !== prevProps.userId) { | |
this.unsubscribe(this.props.userId); | |
this.subscribe(this.props.userId); | |
} |