Publicly exposing ./core/indexUtils

(Sorry for the barrage of posts. Figured I’d just post all of the things I have questions about at once.)

It’d be great if, as a starting point when creating a custom connector, the community would be able to replicate the built-in connectors as-is.

Currently, the above is not possible without jumping through a big hoop (more on this below) because many (all?) of the provided connectors make significant use of the internal core/indexUtils module which is not publicly exposed. It seems like most everything in indexUtils would be useful to anyone making custom connectors.

The big hoop the community has to jump through is, of course, the duplication of key indexUtils methods in our custom connector. Not a big deal, but far from ideal.

Thoughts?

Hi @wrksprfct!

indexUtils will not be exposed because this is an internal utility that evolves a lot over time.

Also we know that createConnector is an API that is complex. Like I said on another thread, I want to provide an API that will remove its usage if you only need to access some property to perform conditional rendering. But I know that an API like this will always be needed in order for our user to add some missing feature.

Ideally we should simplify its usage and we should also know when someone needs it because it often means that we have an opportunity here to improve the library itself.

Maybe you can share your current needs?

@marielaure.thuret - Yeah, I figured it was private for just that reason. :slight_smile:

I think that your suggestion of wrapping components in a pure loading-only connector obviates recreating a specific connector—say, connectHits—wholesale with its use of indexUtils.

Thx again!