Skip to content

Commit 99b58d8

Browse files
committed
tested basic
1 parent 8a649bb commit 99b58d8

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

extension/src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function App() {
3838

3939
// By checking data more thoroughly, we can avoid adding data that we don't expect in child components. This is the data we have the least control over.
4040
// Future iteration could use Zod or something a little less manual and be a more prcise
41+
console.log('Recieved event message', message)
4142
if (
4243
message.type === 'event' &&
4344
message.payload &&

package-react/react-examples-tanstack/basic/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"devDependencies": {
1818
"@tanstack/eslint-plugin-query": "^5.35.6",
1919
"@vitejs/plugin-react": "^4.2.1",
20-
"react-query-rewind": "^2.0.2",
2120
"vite": "^5.1.1"
2221
},
2322
"browserslist": {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'vite'
2+
import react from '@vitejs/plugin-react'
3+
import path from 'path'
4+
5+
export default defineConfig({
6+
plugins: [react()],
7+
resolve: {
8+
alias: {
9+
react: path.resolve(__dirname, 'node_modules/react'),
10+
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
11+
'@tanstack/react-query': path.resolve(__dirname, 'node_modules/@tanstack/react-query'),
12+
},
13+
},
14+
})

package-react/src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ function ReactQueryRewind() {
1515

1616
const handleMessages = (message: any) => {
1717
if (contentConnectedRef.current) {
18+
console.log('Sending Event');
1819
sendEvent(message);
1920
} else {
2021
contentMessageQueueRef.current.push(message);
22+
console.log('Current Queue:', contentMessageQueueRef.current);
2123
}
2224
};
2325

2426
const sendEvent = (event: any) => {
27+
console.log('Sending Event:', event.queryHash);
2528
window.postMessage(
2629
{ framework: 'react', type: 'event', payload: event },
2730
'*'

0 commit comments

Comments
 (0)