question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add interactive examples to README

See original GitHub issue

What:

The README should include the list of examples. Each example item should contain:

  1. A thumbnail image.
  2. A title.
  3. A short description on the example’s purpose.
  4. A link to the interactive playground (Codesandbox) with the respective example.

Why:

Carefully designed, a list of examples may substitute documentation at its entirety. At least it’s a great illustrative showcase for practical learners and beyond.

How:

I suggest to split examples into sections based on the complexity level.

Basics

  • Basic composition. Example of two elements combining into a composition. Can be icon and text, or anything.
  • Responsive props. Shows how to use Responsive props. Can utilize the previous “Basic composition” example, but improve it with some responsive props to show the change.
  • Nested composition

Intermediate

  • Conditional rendering. Showcases the usage of the <Only/> component.
  • Custom configuration. Example of using Layout.configure() to set custom breakpoints and custom measurement unit.
  • Demonstrate how to use the query() utility function to compose inline media queries in styled-components

Advanced

  • Responsive sife effect. How to execute any side effect upon breakpoint change (useResponsiveQuery)
  • Responsive component. How to add Responsive props support to any React component.
  • SSR of conditional components. How to use <Visible/> to conditionally render components and support client-side hydration.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kettanaitocommented, Apr 22, 2020

@dandelionadia, thank you for the fixes! Please, if I may, there are a few more comments.

Conditional rendering

  • Could you please fix those errors in the console? They are related to prop name casing in Logo.js (svg element).
  • I’d be better if “Documentation” linked to the root page. The same way “GitHub” should link to the repo page.
  • Could you please also add a description to the example and some hashtags?

Custom configuration

  • It’d be great to put the data array into a separate JSON file (i.e. data.json).
  • What do you think if we set maxWidth={16} and maxWidthTablet={30} on Album.js component? So it doesn’t stretch full-width on small screens.
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create an interactive README for your GitHub profile
1) Create a new GitHub repo with the same name as your username. · 2) Create an account on Link Click Counter using...
Read more >
Make a README
Learn how to make a great README for your programming project, and use the editable template to get started.
Read more >
Add Interactive and beautiful README to Your GitHub Profile ...
Checkout For example: 2. After the above step, open the created repository then you will see README.
Read more >
How to add interactive plots to a readme file (generated in R ...
... these as examples of what the package can do in my README file, but unfortunately it seems that github documents don't allow...
Read more >
How to Write a Good README File for Your GitHub Project
Provide instructions and examples so users/contributors can use the project. This will make it easy for them in case they encounter a problem...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found