Skip to content

Commit 4cad62d

Browse files
authored
docs(installation): fix instructions for cjs (#83)
Without using `withDevTools(AppExport)`, Remix throws a warning: ``` Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it. ```
1 parent 5b00c19 commit 4cad62d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ If you're using CJS instead of ESM you can do the following instead:
6969
if(process.env.NODE_ENV === 'development') {
7070
- const { withDevTools } = await import("remix-development-tools");
7171
+ const { withDevTools } = require("remix-development-tools");
72-
AppExport = withDevTools
72+
AppExport = withDevTools(AppExport);
7373
}
7474
export default AppExport;
7575

0 commit comments

Comments
 (0)