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.

React Images v1 🎉

See original GitHub issue

For the past few months I’ve been rewriting react-images from the ground up. Having solidified some of the core concepts, i’d really like to hear your thoughts 🙂

Check out the v1 branch -->

The main impetus for rewriting this library was providing consumers with the building blocks necessary to create their component. Need extra buttons in the header? No problem, import react-images’ <Header /> component and enhance it. Need to render videos rather than images? No problem, replace the <View /> component and pass the data required to the views property.

General notes:

  • At the moment the v1 branch is just a create-react-app until we decide on a build setup
  • Much of the state is now internal, simplifying implementation for the consumer
  • This project now leverages the amazing react-view-pager, which takes care of the touch/swipe boilerplate via react-motion
  • A great deal of the component architecture has come from recent R&D with @JedWatson for version two of react-select

Features of v1:

  • 🛠   Comprehensively typed (flow)
  • 📱   Support for touch devices
  • 📺   Fullscreen support on desktop devices
  • 🖼   Carousel without modal dialog
  • 🏖   No restrictions on data shape
  • 🚀   Replaceable component architecture

Many of the requirements, issues, and feature requests should be addressed by the new customisable component architecture without requiring changes to the core.

What this means for v0.x

No need to worry. I, together with @neptunian (the primary maintainer, who’s doing an amazing job!), will continue to release critical bug fixes. We won’t however be implementing enhancements or new features unless provided in a rock-solid PR.

The new API is a massive departure from v0.x, so there won’t be an “upgrade guide” as such. I’ll endeavour to provide a handful of examples to cover most use-cases and welcome anyone else to do the same.

Still left to do:

  • settle on and implement a build tool
  • unit tests for each component
  • integration tests for carousel/modal
  • lockdown the API and release an alpha
  • light-weight theming/styling for components
  • add classnames for those who prefer styling with CSS
  • default components implement ARIA best practices

I’d like to thank everyone who has contributed to this project over the years, without your support react-images wouldn’t be where it is today. Cheers to the open source community 💖

Looking forward to your feedback!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:14
  • Comments:35 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
iammatthiascommented, Feb 6, 2019

@oriamir the SSR issue affects a lot of people who might use this library, considering how popular frameworks like Gatsby are becoming.

If you want the current version released as a V1, what’s stopping you from using the alpha? Changing it from alpha to V1 doesn’t make any functional difference.

Give the maintainers time to do their thing and live their lives. The great thing about this project being open-source is that nothing is stopping you from submitting a PR that fixes what you perceive to be an issue.

@neptunian, thanks for the work you’ve put into this.

6reactions
weslleyaraujocommented, Apr 30, 2018

yarn add react-images@next is currently failing for me 😩

Module not found: Can't resolve 'react-images' in '...'

Looking at node_modules/react-images/package.json I got

{
  "version": "1.0.0-alpha.1",
  "main": "lib/index.js",
  "jsnext:main": "dist/react-images.es.js",
  "module": "dist/react-images.es.js",
}

There is no lib or dist directory, only src is there… maybe something is missing on the publish script?

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-images - npm
A mobile-friendly, highly customizable, carousel component for displaying media in ReactJS. Latest version: 1.2.0-beta.7, last published: 2 ...
Read more >
How to Build an Image Gallery with NextJS using the Pexels ...
In this article, we will build an Image Gallery with Next.js using the Pexels API and Chakra UI v1, a modular and accessible...
Read more >
Render Browser Specific Content with React
A React component to render browser specific content. ... 'coz I'd like to take feedback and improve on it before publishing v1.0.0.
Read more >
React Images - GitHub Pages
Import the carousel from react-images at the top of a component and then use it in the render function. import React from 'react';...
Read more >
React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
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