Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more code examples #23

Open
kirillzyusko opened this issue Mar 20, 2021 · 4 comments
Open

Add more code examples #23

kirillzyusko opened this issue Mar 20, 2021 · 4 comments
Assignees
Labels

Comments

@kirillzyusko
Copy link
Owner

Is your feature request related to a problem? Please describe.

It's not a real problem of library itself. I would say it's more about documentation. Sometimes it's better to see real example, than reading a thousands line of text, so, please, add more real code examples.

Describe the solution you'd like

I would like to see next examples:

  • usage of preload API (component, group);
  • usage placeholder option;
  • tab/drawer examples;

Describe alternatives you've considered

I think it would be good to have all examples in one place (let's say in Example application) and at the same time have separate Snacks for each case (these snacks can be added to documentation).

@Victorcassiano
Copy link

I agree, I found the lib great, but I tried to use it in the RN with typescript I don't know if it worked or not

@kirillzyusko
Copy link
Owner Author

@Victorcassiano it also works in TS. Why do you have doubts that it doesn't work?

@Victorcassiano
Copy link

Victorcassiano commented Jul 22, 2021

@Victorcassiano também funciona em TS. Por que você tem dúvidas de que não funciona?

That's where it is, I did the correct steps that the doc indicates, but it doesn't have a counter to know if it really worked or not.

to check I used this.

import { investigate } from 'react-native-bundle-splitter/dist/utils';
console.log('Bundle Info: ', investigate().loaded);

1992 appeared loaded, does that mean it worked?

@kirillzyusko
Copy link
Owner Author

@Victorcassiano try to wrap some of your screens in register HOC. After that check the output from the investigate function. If you did everything correctly, then you will not see your screens in loaded. If so, then everything works correctly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants