Skip to content

Tutorials Section: Update code blocks with JS/TS toggle#1230

Merged
markerikson merged 5 commits into
reduxjs:masterfrom
PrinceRajRoy:docs-update
Jun 30, 2021
Merged

Tutorials Section: Update code blocks with JS/TS toggle#1230
markerikson merged 5 commits into
reduxjs:masterfrom
PrinceRajRoy:docs-update

Conversation

@PrinceRajRoy
Copy link
Copy Markdown
Contributor

Kicking off #1203

This PR updates the code snippets under Tutorials section to support JS/TS toggles

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci Bot commented Jun 29, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0cf9004:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
rsk-github-issues-example Configuration
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 29, 2021

✔️ Deploy Preview for redux-starter-kit-docs ready!

🔨 Explore the source changes: 0cf9004

🔍 Inspect the deploy log: https://app.netlify.com/sites/redux-starter-kit-docs/deploys/60dc04c3ca95080008c75a08

😎 Browse the preview: https://deploy-preview-1230--redux-starter-kit-docs.netlify.app

@PrinceRajRoy
Copy link
Copy Markdown
Contributor Author

PrinceRajRoy commented Jun 29, 2021

@phryneas The remark tool removes React imports in JS version if jsx is not used in the file. Is there a way to skip that?

@phryneas
Copy link
Copy Markdown
Member

Hmm. Not entirely sure to be honest. That could be a prettier thing maybe?

In this case - maybe just return a <div>{/* rendering logic */}</div>?

@markerikson
Copy link
Copy Markdown
Collaborator

I'm not sure it makes sense to have the code samples in the "TS Quick Start" page be compiled to plain JS, given that the entire point is to have them in TS :)

@PrinceRajRoy
Copy link
Copy Markdown
Contributor Author

@markerikson I was thinking about it, then again the issue said All the snippets, so I thought that's included, anyways pushing the discarded changes 😅

@markerikson
Copy link
Copy Markdown
Collaborator

look you're supposed to read my mind and realize that when I said "all" I actually meant "all of them that make sense" even though I didn't specify that and wasn't even thinking about this case at the time :)

@markerikson
Copy link
Copy Markdown
Collaborator

looks good!

@markerikson markerikson merged commit b781f5c into reduxjs:master Jun 30, 2021
@PrinceRajRoy PrinceRajRoy deleted the docs-update branch July 1, 2021 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants