Skip to content

Instantly share code, notes, and snippets.

<ReactiveBase
credentials={CRED}
app={APP}
theme={{
colors: {
textColor: "#424242",
primaryColor: "#08c"
}
}}
>
const sk = new SearchkitManager(`${URL}`, {
basicAuth: `${CRED}`,
});
<SearchkitProvider searchkit={sk}>
<>
<Navbar />
<div className={wrapper}>
<Filters />
<Results />
<ReactiveGoogleMap
dataField="location"
componentId="maps"
defaultZoom={13}
defaultCenter={{ lat: 14.55436, lng: -85.76 }}
historicalData={true}
setMarkerCluster={true}
showMapStyles={false}
showSearchAsMove={false}
defaultMapStyle="Light Monochrome"
<ReactiveList
componentId="queryResult"
dataField="name"
from={0}
size={15}
renderItem={(item) => (
<ReactiveList.ResultListWrapper>
<ResultList key={item._id}>
<ResultList.Image src={item.image} />
<ResultList.Content>
Hey axeff
Here is the detailed description of this issue.
### Why this is Happening?
We are running into this error because `SingleDropdownList`'s `componentWillUnmount` is getting triggered lazily and hence the clean up happens (asynchronously) after the re-mounted component's `componentWillMount` is executed which is an expected behavior as per react.
Since we have same `componentId` both of the components are removed from store and everything breaks as we dont have track of the component now.
### When will this happen
Whenever we `remount` the component, either by changing the `key` of the component or by manually unmounting and mounting as done [here](https://codesandbox.io/s/vmqkypz22y).
<template>
<ReactiveBase app="good-books-ds" credentials="nY6NNTZZ6:27b76b9f-18ea-456c-bc5e-3a5263ebc63d" >
<div class="row">
<div class="col">
<MultiDropdownList
componentId="BookSensor"
dataField="original_series.raw"
@valueChange="logchange"
v-bind:defaultSelected="defaultSelected"
v-bind='subProps'
@jyash97
jyash97 / App.vue
Last active November 21, 2019 15:20
<ReactiveList
componentId="SearchResult"
dataField="original_title.raw"
:pagination="true"
:from="0"
:size="8"
:showResultStats="false"
className="result-list-container"
:react="{ and: ['Ratings', 'Authors', 'title'] }"
:innerClass="{ list: 'books-container', poweredBy: 'appbase' }"
@jyash97
jyash97 / styles.css
Last active December 18, 2018 15:34
body {
margin: 0;
background: #f7f7f7;
}
.navbar {
padding: 15px;
background: #181c2b;
display: flex;
z-index: 4;
<template>
<div id="app">
<ReactiveBase
app="good-books-yj"
credentials="gBgUqs2tV:3456f3bf-ea9e-4ebc-9c93-08eb13e5c87c"
>
<div class="navbar">
<h2>📚Book<span>Search</span></h2>
<DataSearch
componentId="title"
<DataSearch
componentId="title"
iconPosition="right"
:dataField="[
'original_title',
'original_title.search',
'authors.search',
'authors.raw',
'authors.autosuggest',
'authors'