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.

Hi, absolutely love the speed, robustness, and elegance of S.js.

I am building something with S.js that requires me to keep a large data structure that looks something like a Map<string, DataSignal<any>>. I would like the insertions and deletions to the Map to be reactive because some of the computations in the map rebuild their computed values based on other values in the map being available or not available .

I don’t need Mobx in this application, or else I would use it’s reactive Map, because it’s a very low level app, where the performance of S.js is desired. Any idea for a simple way to achieve observing some kind of keyed data structure with S.js? It doesn’t have to a true ES6 Map, just some way to achieve the desired effect.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ryansolidcommented, Dec 25, 2018

In regards to the dirty tracking you could do it that way. For arrays we are pretty used to using rest operators, concating, or other immutable methods to clone the array and set the Signals so it’s why I feel less awkward setting it. If I were to make a pure Map option I’d expect this handled for me, But I think this is probably more inspired from the desire of encapsulating existing data structure uses than what makes the most sense to how to pattern code with Signals.

0reactions
mrjjwrightcommented, Jan 26, 2019

@adamhaile Is it ok to share 2 different unique indexes over the same SArray?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Maps
Find local businesses, view maps and get driving directions in Google Maps.
Read more >
Google Maps - Apps on Google Play
Navigate your world faster and easier with Google Maps. Over 220 countries and territories mapped and hundreds of millions of businesses and ...
Read more >
Maps - Apple
It's quick and easy to find just what you're looking for in Maps. Use ultra-targeted filters to search for restaurants by cuisine, price...
Read more >
Maps - Bing
Map multiple locations, get transit/walking/driving directions, view live traffic conditions, plan trips, view satellite, aerial and street side imagery.
Read more >
MAPS.org - Support Psychedelic Science - Multidisciplinary ...
Delivering global healing through psychedelic research. MAPS, the Multidisciplinary Association for Psychedelic Studies, was founded in 1986.
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