Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 30, 2021

Conversation

PrinceRajRoy
Copy link
Contributor

Kicking off #1203

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

@codesandbox-ci
Copy link

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

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
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
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
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
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
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
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