Created
April 25, 2020 11:31
-
-
Save erdemuslu/de4cf9b57bf501f621f14afdbb8d6b05 to your computer and use it in GitHub Desktop.
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 { inject, observer } from 'mobx-react'; | |
const View = (observer(({ status, lyricsData }) => ( | |
<div> | |
<h1>Sarki sozu:</h1> | |
<p>{status === 'loading' && 'Yukleniyor...'}</p> | |
<p>{status === 'error' && 'Bir hata olustu'}</p> | |
<p dangerouslySetInnerHTML={{ __html: status === 'done' ? lyricsData : '' }} /> | |
</div> | |
))); | |
export default inject((stores) => ({ | |
status: stores.Store.status, | |
lyricsData: stores.Store.lyricsData, | |
}))(View); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment