From 928381c7596c18ad18aa109d85918d8828cd52ea Mon Sep 17 00:00:00 2001 From: guglie Date: Thu, 7 May 2020 22:42:46 +0200 Subject: [PATCH] Fix screen template: useStores() comments (#336) uncommenting the line `const { someStore } = useStores()` in a newly created project gives an unintuitive **TypeError**. I understand that the use of rootStore may be discouraged, but it may be useful for beginners at least to add a line that works as is when uncommented. --- templates/screen.ejs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/screen.ejs b/templates/screen.ejs index 76566a49..642838e7 100644 --- a/templates/screen.ejs +++ b/templates/screen.ejs @@ -17,7 +17,9 @@ const ROOT: ViewStyle = { } export const <%= props.pascalName %>: React.FunctionComponent<<%= props.pascalName %>Props> = observer((props) => { - // const { someStore } = useStores() + // const { someStore, anotherStore } = useStores() + // OR + // const rootStore = useStores() return (