Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat: export highlight tags from DOM / native #1342

Merged
merged 2 commits into from
Jun 18, 2018
Merged

Conversation

samouss
Copy link
Collaborator

@samouss samouss commented Jun 18, 2018

Summary

In some cases you may want to have a very specific highlighting behaviour. For those use cases you will need to have access to the highlighTag set by React InstantSearch (see Yarn website). You can still override the tags but it can be handy to use the one by default. Previously it was only exported by the core package. Now you can access this value directly from DOM & Native.

Before:

// Only available through `core`
import { HIGHLIGHT_TAGS } from "react-instantsearch-core";

After:

// Now available through `dom`
import { HIGHLIGHT_TAGS } from "react-instantsearch-dom";

// and `native`
import { HIGHLIGHT_TAGS } from "react-instantsearch-native";

@samouss samouss requested a review from Haroenv June 18, 2018 07:16
@algobot
Copy link
Contributor

algobot commented Jun 18, 2018

Deploy preview for react-instantsearch ready!

Built with commit 4afd487

https://deploy-preview-1342--react-instantsearch.netlify.com

@@ -1,5 +1,6 @@
// Core
export { createConnector } from 'react-instantsearch-core';
export { HIGHLIGHT_TAGS } from 'react-instantsearch-core';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can do those in the same export with ,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep but I think it's a bit more easy to read with a separate statement.

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionally the same so fine :)

@samouss samouss merged commit 28a699e into master Jun 18, 2018
@samouss samouss deleted the feat/highlight-tags branch June 18, 2018 08:45
samouss added a commit that referenced this pull request Jun 19, 2018
<a name="5.2.0-beta.2"></a>
# [5.2.0-beta.2](v5.2.0-beta.1...v5.2.0-beta.2) (2018-06-19)

### Features

* export highlight tags from DOM / native ([#1342](#1342)) ([28a699e](28a699e))
* **createInstantSearch:** enable _useRequestCache ([#1346](#1346)) ([f772600](f772600))
* **dom:** export create class name ([#1348](#1348)) ([9017468](9017468))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants