Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #106
What I did
Started working on adding in more of the csf functionality.
The configure function of the preview class is now the result of calling the loadcsf function from core client. This is similar to how the react storybook "start.js" works.
I've renamed the example with CSF in it so its easier to find.
Now configure if called this way and if you use the auto import stories it will generate the code for this.
configure("react-native", getCSFStories, module, true)
getCSFStories is a function that returns the require("filepath") calls for csf files.
Fast reload needs to be well tested to confirm that everything works as expected.
--edit 1
So it turns out fast reload is pretty much completely broken 😅
--edit 2
Managed to get fast reload working, it seems like module.hot.dispose data param is not supported in native so I went with a global variable. Not ideal but its at least working now. However I did have to edit loadcsf so it would require changes in storybook or we won't be able to re-use the current loadcsf.
currently there is an issue with non csf stories that I need to debug before merging.
-- final edit?
Non csf stories now also working, so it looks like csf and args are mostly done.
How to test
In progress
You can start the example app in examples/native and see that the stories are rendering.