Giter Club home page Giter Club logo

Comments (4)

gingerlime avatar gingerlime commented on August 15, 2024

Hey @zwacky !

I never considered Alephbet for usage on the server, although I guess in theory it should work there as well.

I don't remember precisely, but I think store wasn't so maintained and basil seemed more flexible with different fallback options etc? At my company, we used it, so I thought it makes sense to also use it with Alephbet.

@joker-777 any thoughts ?

from alephbet.

gingerlime avatar gingerlime commented on August 15, 2024

Oh, and I completely forgot but you can actually provide your own storage adapter. See https://github.com/alephbet/alephbet#custom-storage-adapter

This means you can still use the latest Alephbet, but just provide a storage adapter using whatever you want ;-)

Nevertheless, it might be worth looking at a different default library. Suggestions welcome

from alephbet.

zwacky avatar zwacky commented on August 15, 2024

Hey gingerlime, thanks for your reply!
We already use custom storage adapters—actually we use pretty much all features that alephbet provides 😊.

To give a bit more context in terms of SSR:

We don't use alephbet in the server directly, it's only used in the client after hydration.
But we use TS typings in various places directly from alephbet (e.g. AlephBet.Goal). That makes it part of the linting/compilation and it stumbles on the window references coming from basil.js (https://github.com/Wisembly/basil.js/blob/master/build/basil.js search for window).

^ This screams refactoring, but I still have so many other fires to fight. That's why I downgraded to 0.17.3 for now to unstuck myself on this particular matter.

from alephbet.

gingerlime avatar gingerlime commented on August 15, 2024

Thanks for the added context. I'm definitely open to a better solution. Maybe simply replacing it with direct localStorage calls and skip the abstraction completely. If you have any suggestions or want to contribute a PR, that would be great.

from alephbet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.