Add imports to docs examples
See original GitHub issueCurrently docs feature examples like this:
const MyComponent = () => (
<Button raised onPress={() => console.log('Pressed')}>
Press me
</Button>
);
What I find not great for DX here is the lack of import
statement, which clearly states how to import the module.
This looks much better and removes the ambiguity of how to import specific component:
import { Button } from 'react-native-paper';
const MyComponent = () => (
<Button raised onPress={() => console.log('Pressed')}>
Press me
</Button>
);
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Import data sets & spreadsheets - Google Docs Editors Help
On your computer, open a spreadsheet in Google Sheets. Open or create a sheet. At the top, click File and then Import. Choose...
Read more >Importing Your Documentation - Read the Docs
To import a public documentation repository, visit your Read the Docs dashboard and click Import. For private repositories, please use Read the Docs...
Read more >Utility API docs: Add @import functions, variables to ... - GitHub
Utility API docs: Add @import functions, variables to the examples. Since _utilities references, _variables , and _variables references ...
Read more >5. The import system — Python 3.11.1 documentation
The first is the fully qualified name of the module being imported, for example foo.bar.baz . The second argument is the path entries...
Read more >import - JavaScript - MDN Web Docs - Mozilla
In HTML, this is done by adding type="module" to the <script> tag. ... For example, if the module imported above includes an export ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do it 😃
If we are adding imports, let’s add everything that’s needed to copy/paste and run the example