Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix(web): 修复 web 下 useQuery 无法获取到参数的问题
Browse files Browse the repository at this point in the history
fix #1112
  • Loading branch information
Darmody committed Jun 23, 2020
1 parent 76e6548 commit c6e6b75
Show file tree
Hide file tree
Showing 13 changed files with 105 additions and 54 deletions.
11 changes: 9 additions & 2 deletions e2e/dummy/src/pages/two/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import * as React from 'react';
import { View, Text } from 'remax/one';
import { useQuery } from 'remax';
import { View } from 'remax/one';

export default () => {
return <View>page two</View>;
const query = useQuery();
return (
<View>
page two
<View>{query.q}</View>
</View>
);
};
5 changes: 5 additions & 0 deletions e2e/dummy/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ describe('works', () => {
await goTo('/pages/two/index');
await expect(page).toMatch('page two');
});

it('useQuery', async () => {
await goTo('/pages/two/index?q=query');
await expect(page).toMatch('query');
});
});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

1 comment on commit c6e6b75

@vercel
Copy link

@vercel vercel bot commented on c6e6b75 Jun 23, 2020

Choose a reason for hiding this comment

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

Please sign in to comment.