Skip to content

Adjust import statement so that it work as example#99

Open
reneroboter wants to merge 1 commit into
NativeScript:developfrom
reneroboter:develop
Open

Adjust import statement so that it work as example#99
reneroboter wants to merge 1 commit into
NativeScript:developfrom
reneroboter:develop

Conversation

@reneroboter

Copy link
Copy Markdown
Contributor

The current import statement in the plain tutorial doesn't work. So I adjusted it to a real working example. I'm not a java script expert, maybe it's better to introduce an index.jsfile, so that the current example work. However I guess this approach is more beginner friendly. Cause it's don't need the knowledge about a import statement with an index.js file.

@cla-bot cla-bot Bot added the cla: yes label Aug 31, 2022
@rigor789

Copy link
Copy Markdown
Member

Good catch, I believe the imports are correct for the GitHub sample repo, but not the tutorial content itself - in the repo, there are index.ts files in the models and services folders that export everything:

https://github.com/NativeScript/tutorials/blob/main/plain-tutorial/app/services/index.ts
https://github.com/NativeScript/tutorials/blob/main/plain-tutorial/app/models/index.ts

We should either include those in the tutorial text, or drop them and just use full imports. I'm fine with either way...

/cc @NathanWalker @williamjuan027

@reneroboter

Copy link
Copy Markdown
Contributor Author

@rigor789 i didn't noticed that there is a repo for the tutorials, therefor a would recommend also to use the index.js in the tutorials :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants