Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

Commit 18d4d36

Browse files
committed
README: document importing components by name/path.
1 parent 2eefb8b commit 18d4d36

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ external make:
169169

170170
The type of `make` must have a named argument for each prop in the JS component. Optional props have option type. The `make` function will be generated by `genType`.
171171

172+
This assumes that the JS component was exported with a default export. In case of named export, use `@genType.as "componentName"`. To import a nested component, use e.g. `@genType.as "Some.Nested.component"`.
173+
172174
**NOTE** The argument of `@bs.module`must always be the name of the current file plus `.gen` (In future, this could be automatically generated).
173175

174176
### Type Expansion and @genType.opaque

0 commit comments

Comments
 (0)