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.

I’m midway through a massive rewrite of this library and wanted to open an issue so it’s more visible. There will be several breaking changes to the API, all for the better.

WIP is visible on the rebuild branch.

Aside from how we’re bundling lib and dist files (which won’t change for now), it basically addresses all the things that @brianreavis raised in #227.

I’ve been trying to split Select up into more granular components as suggested by @bruderstein in #396, but it’s not obvious how to do this while also cleaning everything up and preserving a simple API so that can probably be the focus of another major version down the track.

The big improvements include:

  • Everything is simpler (I’m nearly done and the source code is only 60% of the size of the last version)
  • No more timeouts or weird handlers, the restructuring has let me make everything more straight-forward
  • The options array is no longer preprocessed into state, just retrieved from props
  • The values array is now initialised in the Options array during render, and not stored in state, which along with the change to options makes the component more reliable and fixes issues with props not updating correctly
  • The component no longer stores its own value in state (ever) - it needs to be passed as a prop and handled with onChange.
  • Complex values are now enabled by default (so you’re passed the option object, not its value); you can enable the legacy mode with a prop
  • The Value and Option components have been cleaned up as well for consistency
  • The hidden <input> field is now optional and the component is better suited to use in a rich React.js app than it was
  • You can disable options filtering to do the filtering externally with onInputChange
  • Accents on characters can now be ignored

The other major change is that the whole async options loading piece has been split out into its own Select.Async component, which wraps Select and passes most props through. This dramatically simplifies the select component itself, and plays nicely with the new “options and value are just props” changes. Props that were related to asyncOptions have also been moved to the new component.

Aside from the details of what’s been changed, it just feels better to use, more solid. I don’t have benchmarks to back this up, but it should be much faster too (and easier to optimise in subsequent versions)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:97
  • Comments:39 (9 by maintainers)

github_iconTop GitHub Comments

23reactions
tannerlinsleycommented, Nov 30, 2016

@JedWatson Where are you guys with a stable 1.0.0 release? I would be more than willing to help. I’ve been using the old stable for a while now and would love to upgrade @nozzle to 1.0.0

8reactions
JedWatsoncommented, Nov 24, 2017

1.0.0 is out 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

URL Rewrite : The Official Microsoft IIS Site
IIS URL Rewrite 2.1 enables Web administrators to create powerful rules to implement URLs that are easier for users to remember and easier...
Read more >
Microsoft.AspNetCore.Rewrite 1.0.0 - NuGet
ASP.NET Core basic middleware for rewriting URLs. Includes: * Support for custom URL rewrite rules * Support for running IIS URL Rewrite ......
Read more >
ISI ReWrite Decoder Release 1.0.0a
The ISI ReWrite Decoder is a program that translates from one natural languge into another using statistical machine translation.
Read more >
URL Rewrite 1.0 writes the original URL into the IIS logs not ...
Extract = Logging of rewritten URLs. The rewrite rules can be configured to log the rewritten URL in IIS W3C logs as opposed...
Read more >
Readme — rewrite-clj 1.0.591-alpha - cljdoc
rewrite -clj: A library that reads and writes Clojure, ClojureScript and EDN from Clojure and ClojureScript in a whitespace and comment preserving way....
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