Skip to content

Commit

Permalink
[add: Layout & lib & setting] Refine folder, useStoreLib, gitignore
Browse files Browse the repository at this point in the history
[add: Layout] : add Container folder
[add: lib]  : add useStoreLib
[add: setting] config folder gitignore
  • Loading branch information
SoonGwan committed Aug 17, 2020
1 parent 9c603ad commit b4836c2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
/node_modules
/.pnp
.pnp.js
config/

# testing
/coverage


# production
/build
.build
Expand Down
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const App = observer(() => {
})
}
load()
}, [])
}, [store])

return (
<Provider {...stores}>
Expand Down
Empty file added src/container/.keep
Empty file.
8 changes: 8 additions & 0 deletions src/lib/useStore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { useContext } from 'react'
import { MobXProviderContext } from 'mobx-react'

const useStores = () => {
return useContext(MobXProviderContext)
}

export default useStores

0 comments on commit b4836c2

Please sign in to comment.