Skip to content

Commit 7d18a1a

Browse files
DemianDCompuIves
authored andcommitted
prevent placeholder from constantly rerender in Search (codesandbox#732)
* prevent placeholder from constantly rerender in Search * add myself as contributor
1 parent ef822d4 commit 7d18a1a

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

β€Ž.all-contributorsrcβ€Ž

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,16 @@
515515
"bug",
516516
"code"
517517
]
518+
},
519+
{
520+
"login": "DemianD",
521+
"name": "Demian Dekoninck",
522+
"avatar_url": "https://avatars2.githubusercontent.com/u/5346497?v=4",
523+
"profile": "https://dem.be",
524+
"contributions": [
525+
"code"
526+
]
518527
}
519-
]
528+
],
529+
"repoType": "github"
520530
}

β€ŽREADME.mdβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [CodeSandbox](https://codesandbox.io) [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/KE3TbEZ) [![All Contributors](https://img.shields.io/badge/all_contributors-53-orange.svg?style=flat-square)](#contributors) [![CircleCI](https://circleci.com/gh/CompuIves/codesandbox-client.svg?style=svg)](https://circleci.com/gh/CompuIves/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
1+
# [CodeSandbox](https://codesandbox.io) [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/KE3TbEZ) [![All Contributors](https://img.shields.io/badge/all_contributors-54-orange.svg?style=flat-square)](#contributors) [![CircleCI](https://circleci.com/gh/CompuIves/codesandbox-client.svg?style=svg)](https://circleci.com/gh/CompuIves/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
22

33
An online code editor tailored for web applications.
44

@@ -36,6 +36,7 @@ Thanks goes to these wonderful people
3636
([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
3737

3838
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
39+
<!-- prettier-ignore -->
3940
| [<img src="https://avatars0.githubusercontent.com/u/587016?v=3" width="100px;"/><br /><sub><b>Ives van Hoorne</b></sub>](http://ivesvh.com)<br />[πŸ’¬](#question-CompuIves "Answering Questions") [πŸ“](#blog-CompuIves "Blogposts") [πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3ACompuIves "Bug reports") [πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=CompuIves "Code") [🎨](#design-CompuIves "Design") [πŸ“–](https://github.com/CompuIves/codesandbox-client/commits?author=CompuIves "Documentation") [πŸ’‘](#example-CompuIves "Examples") [πŸš‡](#infra-CompuIves "Infrastructure (Hosting, Build-Tools, etc)") [πŸ‘€](#review-CompuIves "Reviewed Pull Requests") [⚠️](https://github.com/CompuIves/codesandbox-client/commits?author=CompuIves "Tests") [πŸ”§](#tool-CompuIves "Tools") | [<img src="https://avatars0.githubusercontent.com/u/887639?v=3" width="100px;"/><br /><sub><b>Donavon West</b></sub>](http://donavon.com)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=donavon "Code") | [<img src="https://avatars0.githubusercontent.com/u/5266810?v=3" width="100px;"/><br /><sub><b>Jeff Allen</b></sub>](http://www.jeffallen.io/)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=vueu "Code") | [<img src="https://avatars0.githubusercontent.com/u/1089897?v=3" width="100px;"/><br /><sub><b>Ben Gummer</b></sub>](https://github.com/bengummer)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=bengummer "Code") | [<img src="https://avatars3.githubusercontent.com/u/154732?v=3" width="100px;"/><br /><sub><b>James Gillmore</b></sub>](http://twitter.com/faceyspacey)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=faceyspacey "Code") [πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3Afaceyspacey "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/9636410?v=4" width="100px;"/><br /><sub><b>Ade Viankakrisna Fadlil</b></sub>](https://github.com/viankakrisna)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=viankakrisna "Code") | [<img src="https://avatars1.githubusercontent.com/u/1854763?v=4" width="100px;"/><br /><sub><b>Tushar Sonawane</b></sub>](https://twitter.com/tushkiz)<br />[πŸ’¬](#question-Tushkiz "Answering Questions") [πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=Tushkiz "Code") [πŸ“–](https://github.com/CompuIves/codesandbox-client/commits?author=Tushkiz "Documentation") [πŸ€”](#ideas-Tushkiz "Ideas, Planning, & Feedback") |
4041
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
4142
| [<img src="https://avatars3.githubusercontent.com/u/1239401?v=4" width="100px;"/><br /><sub><b>Johann Hubert Sonntagbauer</b></sub>](https://github.com/johann-sonntagbauer)<br />[πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3Ajohann-sonntagbauer "Bug reports") [πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=johann-sonntagbauer "Code") | [<img src="https://avatars2.githubusercontent.com/u/9586897?v=4" width="100px;"/><br /><sub><b>Joachim Seminck</b></sub>](https://github.com/jseminck)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=jseminck "Code") | [<img src="https://avatars3.githubusercontent.com/u/5210019?v=4" width="100px;"/><br /><sub><b>Subramanya Chakravarthy</b></sub>](http://chakrihacker.github.io)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=chakrihacker "Code") | [<img src="https://avatars3.githubusercontent.com/u/23088?v=4" width="100px;"/><br /><sub><b>Robert (Robby) O'Connor</b></sub>](http://robby.oconnor.ninja)<br />[πŸš‡](#infra-robbyoconnor "Infrastructure (Hosting, Build-Tools, etc)") | [<img src="https://avatars0.githubusercontent.com/u/2083930?v=4" width="100px;"/><br /><sub><b>Bogdan Luca</b></sub>](https://github.com/lbogdan)<br />[πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3Albogdan "Bug reports") [πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=lbogdan "Code") | [<img src="https://avatars3.githubusercontent.com/u/6177621?v=4" width="100px;"/><br /><sub><b>Divjot Singh</b></sub>](http://bogas04.github.io)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=bogas04 "Code") | [<img src="https://avatars3.githubusercontent.com/u/5249539?v=4" width="100px;"/><br /><sub><b>Jason Nall</b></sub>](http://www.jsonnull.com)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=jsonnull "Code") |
@@ -44,5 +45,5 @@ Thanks goes to these wonderful people
4445
| [<img src="https://avatars3.githubusercontent.com/u/6270048?v=4" width="100px;"/><br /><sub><b>Haroen Viaene</b></sub>](https://twitter.com/haroenv)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=haroenv "Code") [🎨](#design-haroenv "Design") | [<img src="https://avatars1.githubusercontent.com/u/293805?v=4" width="100px;"/><br /><sub><b>Nick Nisi</b></sub>](https://nicknisi.com)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=nicknisi "Code") | [<img src="https://avatars2.githubusercontent.com/u/9327315?v=4" width="100px;"/><br /><sub><b>Abhishek Jakhotiya</b></sub>](https://github.com/Jakhotiya)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=Jakhotiya "Code") [πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3AJakhotiya "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/14299145?v=4" width="100px;"/><br /><sub><b>Tom KΓΌhl</b></sub>](http://twitter.com/tomkuehl_)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=tomkuehl "Code") | [<img src="https://avatars2.githubusercontent.com/u/1086461?v=4" width="100px;"/><br /><sub><b>br1anchen</b></sub>](https://github.com/br1anchen)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=br1anchen "Code") | [<img src="https://avatars3.githubusercontent.com/u/11952174?v=4" width="100px;"/><br /><sub><b>Daniel Hsing</b></sub>](https://arthelon.github.io)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=Arthelon "Code") | [<img src="https://avatars2.githubusercontent.com/u/5403694?v=4" width="100px;"/><br /><sub><b>Maciej Kasprzyk</b></sub>](https://twitter.com/_maciejka)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=maciej-ka "Code") |
4546
| [<img src="https://avatars2.githubusercontent.com/u/596727?v=4" width="100px;"/><br /><sub><b>Robert Heessels</b></sub>](https://github.com/robertheessels)<br />[πŸ“–](https://github.com/CompuIves/codesandbox-client/commits?author=robertheessels "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/772937?v=4" width="100px;"/><br /><sub><b>Ryan P. C. McQuen</b></sub>](https://ryanpcmcquen.org)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=ryanpcmcquen "Code") | [<img src="https://avatars3.githubusercontent.com/u/613805?v=4" width="100px;"/><br /><sub><b>Chris</b></sub>](http://chrisrjones.com)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=ipatch "Code") | [<img src="https://avatars3.githubusercontent.com/u/595469?v=4" width="100px;"/><br /><sub><b>Drew Smith</b></sub>](https://github.com/drewsmith)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=drewsmith "Code") | [<img src="https://avatars2.githubusercontent.com/u/12481?v=4" width="100px;"/><br /><sub><b>Eric Berry</b></sub>](https://codesponsor.io)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=coderberry "Code") | [<img src="https://avatars1.githubusercontent.com/u/17228477?v=4" width="100px;"/><br /><sub><b>Hum4n01d</b></sub>](https://www.hum4n01d.me)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=Hum4n01d "Code") | [<img src="https://avatars3.githubusercontent.com/u/10888943?v=4" width="100px;"/><br /><sub><b>Malachi Willey</b></sub>](https://github.com/malwilley)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=malwilley "Code") |
4647
| [<img src="https://avatars0.githubusercontent.com/u/1820292?v=4" width="100px;"/><br /><sub><b>Michel Weststrate</b></sub>](https://twitter.com/mweststrate)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=mweststrate "Code") | [<img src="https://avatars0.githubusercontent.com/u/52824?v=4" width="100px;"/><br /><sub><b>Oleg</b></sub>](https://kof.github.io)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=kof "Code") | [<img src="https://avatars0.githubusercontent.com/u/1127037?v=4" width="100px;"/><br /><sub><b>Paul Sherman</b></sub>](https://www.pshrmn.com)<br />[πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3Apshrmn "Bug reports") [πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=pshrmn "Code") | [<img src="https://avatars2.githubusercontent.com/u/9244507?v=4" width="100px;"/><br /><sub><b>Ro Savage</b></sub>](https://github.com/ro-savage)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=ro-savage "Code") | [<img src="https://avatars3.githubusercontent.com/u/13242392?v=4" width="100px;"/><br /><sub><b>Sam Denty</b></sub>](https://samdd.me)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=samdenty99 "Code") | [<img src="https://avatars1.githubusercontent.com/u/3087225?v=4" width="100px;"/><br /><sub><b>Zephraph</b></sub>](https://github.com/zephraph)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=zephraph "Code") | [<img src="https://avatars1.githubusercontent.com/u/1900735?v=4" width="100px;"/><br /><sub><b>Josh Waller</b></sub>](https://www.joshwaller.me)<br />[πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3Amdxprograms "Bug reports") [πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=mdxprograms "Code") [πŸ“–](https://github.com/CompuIves/codesandbox-client/commits?author=mdxprograms "Documentation") |
47-
| [<img src="https://avatars0.githubusercontent.com/u/1195863?v=4" width="100px;"/><br /><sub><b>Joe Ng'ethe</b></sub>](http://joey.co.ke)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=joeynimu "Code") | [<img src="https://avatars0.githubusercontent.com/u/576935?v=4" width="100px;"/><br /><sub><b>Carles Codony</b></sub>](https://github.com/bitblitter)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=bitblitter "Code") | [<img src="https://avatars2.githubusercontent.com/u/468006?v=4" width="100px;"/><br /><sub><b>Vytenis</b></sub>](https://github.com/FDiskas)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=FDiskas "Code") | [<img src="https://avatars1.githubusercontent.com/u/894149?v=4" width="100px;"/><br /><sub><b>Manuel DuguΓ©</b></sub>](http://manueldugue.de)<br />[πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3Amdugue "Bug reports") [πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=mdugue "Code") |
48+
| [<img src="https://avatars0.githubusercontent.com/u/1195863?v=4" width="100px;"/><br /><sub><b>Joe Ng'ethe</b></sub>](http://joey.co.ke)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=joeynimu "Code") | [<img src="https://avatars0.githubusercontent.com/u/576935?v=4" width="100px;"/><br /><sub><b>Carles Codony</b></sub>](https://github.com/bitblitter)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=bitblitter "Code") | [<img src="https://avatars2.githubusercontent.com/u/468006?v=4" width="100px;"/><br /><sub><b>Vytenis</b></sub>](https://github.com/FDiskas)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=FDiskas "Code") | [<img src="https://avatars1.githubusercontent.com/u/894149?v=4" width="100px;"/><br /><sub><b>Manuel DuguΓ©</b></sub>](http://manueldugue.de)<br />[πŸ›](https://github.com/CompuIves/codesandbox-client/issues?q=author%3Amdugue "Bug reports") [πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=mdugue "Code") | [<img src="https://avatars2.githubusercontent.com/u/5346497?v=4" width="100px;"/><br /><sub><b>Demian Dekoninck</b></sub>](https://dem.be)<br />[πŸ’»](https://github.com/CompuIves/codesandbox-client/commits?author=DemianD "Code") |
4849
<!-- ALL-CONTRIBUTORS-LIST:END -->

β€Žpackages/app/src/app/pages/Search/index.jsβ€Ž

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ const searchStateToUrl = (props, searchState) =>
4040
class Search extends React.PureComponent {
4141
constructor(props) {
4242
super(props);
43-
this.state = { searchState: qs.parse(props.location.search.slice(1)) };
43+
this.state = {
44+
searchState: qs.parse(props.location.search.slice(1)),
45+
randomSearch: getRandomSearch(),
46+
};
4447

4548
this.unlisten = this.props.history.listen((location, action) => {
4649
if (action === 'PUSH') {
@@ -91,7 +94,7 @@ class Search extends React.PureComponent {
9194
<SearchBox
9295
autoFocus
9396
translations={{
94-
placeholder: `Search for a ${getRandomSearch()}...`,
97+
placeholder: `Search for a ${this.state.randomSearch}...`,
9598
}}
9699
/>
97100
<Row alignItems="flex-start">

0 commit comments

Comments
Β (0)