Skip to content

Instantly share code, notes, and snippets.

@erdemuslu
Created April 24, 2020 14:18
Show Gist options
  • Save erdemuslu/4a0e42a4710384507b3a9250a82048bc to your computer and use it in GitHub Desktop.
Save erdemuslu/4a0e42a4710384507b3a9250a82048bc to your computer and use it in GitHub Desktop.
import React, { useEffect } from 'react';
import { inject, observer } from 'mobx-react';
const View = (observer(({ Store }) => {
useEffect(() => {
console.log('view mounted');
}, []);
return (
<div>
{ Store.name }
<h1>Sarki sozu:</h1>
</div>
);
}));
export default inject((stores) => ({
Store: stores.Store,
}))(View);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment