Docz came up to make our lives easier both to build style guides and to write documentation for our components in a beautiful page without much effort.
The problem is: it only works on web projects developed with React until now ;)
We started to think about how Docz could work with React Native as well and thanks to react-native-web it was really simple to connect both as you can check on this Pull Request.
📓 Example
Lets start a new React Native app with Docz, the first thing you have to do is:
> react-native init doczRn && cd doczRn
Now that you are inside your brand new project all you have to do is install docz and the react native plugin with the following command:
For this example, let's install a few more libs:
Create a doczrc.js like this to use your just installed docz-plugin-react-native:
Create a Button.js component in any folder.
Also in the same folder create a Button.mdx file
Now all you have to do is run:
> yarn docz dev
🎉 🎉🎉 Your Docz project is running! Visit http://localhost:3000 and make sure you see the same screen as:
We also uploaded the project to: https://doczfacesreactnative.netlify.com 🚀
Special Thanks to the Developers that helped our team ❤️ 💚 ❤️
You can check the full code on the Repository.