Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Update readme #33

Closed
wants to merge 11 commits into from
Closed

Update readme #33

wants to merge 11 commits into from

Conversation

StevenTCramer
Copy link

This is an Update to the README file and associated source to bring this repo current as of 2018-03-18.

For review it would be excellent if someone could follow the updated README and confirm the instructions are correct and validate the source goes along with the instructions.

Questions or comments are welcomed.

This PR address many of the Issues concerned with later versions or React Native.

#23 #32 #31 #

Steven Cramer added 7 commits March 18, 2018 20:07
Heavy refactoring of the README to update to the latest version of tools and npm packages as of 2018-03-18
Add types for react react-native and jest.
Support the new module formats with esModuleInterop and allowSyntheticDefaultImports
New React-Native uses only a single index.js. This deletes the old files.
Add the new Index.js entry point and the index.ts in src.
React-Native generates theese files orginally now but these are updated to include Hello component.
@StevenTCramer
Copy link
Author

@microsoftopensource @DanielRosenwasser @henrikra @sandersn @bowdenk7 @msftgits

I don't mean to be rude but I have read that the team doesn't get automatic notifications for PRs. And request being mentioned so they will be notified.

Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

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

I'd really prefer many of the stylistic changes made here would be undone, or done in a separate PR. There's a lot to run through, so I've only gone through part of it.

.flowconfig Outdated
@@ -0,0 +1,54 @@
[ignore]
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this file

Copy link
Author

Choose a reason for hiding this comment

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

Removed and .gitignore updated

README.md Outdated
When you've managed to deploy to a device or emulator, you'll be ready to start a TypeScript React Native app.
Because you might be on one of several different platforms, targeting several different types of devices, other setup will be involved. You should first ensure that you can run a plain React Native app without TypeScript. Follow [the instructions on the React Native website to get started](https://facebook.github.io/react-native/docs/getting-started.html). When you've managed to deploy to a device or emulator following their instructions, you'll be ready to start a TypeScript React Native app.

### Notes:
Copy link
Member

Choose a reason for hiding this comment

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

Remove colon

README.md Outdated
Where we use npm, we encourage you to try using [Yarn](https://yarnpkg.com/lang/en/) in its place.
Where we use npm, you can use the equivalent [Yarn](https://yarnpkg.com/lang/en/) command in its place.

`The output of the npm commands will contain numerous warnings that you should be able to safely ignore.`
Copy link
Member

Choose a reason for hiding this comment

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

may contain
remove backticks and fold this into the previous paragraph

README.md Outdated
You'll probably want to get a cup of coffee in general, and get two if you're using npm 4 and earlier.
#### Original directory structure

```sh
Copy link
Member

Choose a reason for hiding this comment

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

Remove the block type

README.md Outdated

# Initializing

Once you've tried scaffolding out an ordinary React Native project, you'll be ready to start adding TypeScript.
Let's go ahead and do that.
Start by initializing our new project (This could take a few minutes).
Copy link
Member

Choose a reason for hiding this comment

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

Let's start by initializing our new project with the `react-native` command.
Note that this may take a few minutes.

README.md Outdated
#### Original directory structure

```sh
C:.
Copy link
Member

Choose a reason for hiding this comment

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

Just use MyAwesomeProject, don't use C:

README.md Outdated
├─── ...
├───android
├───ios
└───__tests__
Copy link
Member

Choose a reason for hiding this comment

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

Add a space following each directory entry

Steven Cramer added 3 commits March 22, 2018 11:20
add .flowconfig to git ignore and remove the file from the repo.
As rule PureComponent should be the default when creating a component.  It does a shallow compare on props and will save much re-rendering.
And clarified a few other items.
@StevenTCramer
Copy link
Author

@DanielRosenwasser Thanks Daniel for the feedback. I updated the specific items you mentioned and re-read the Readme again and found a few other things that needed clarified or cleaned up. I have done a few other documentation PRs. And I try to keep them small. But this one just turned out to be more work. If you anyone else see anything else that needs addressed please let me know and I will do my best to address it ASAP.


```json
{
"compilerOptions": {
// other options here
"types": ["react","react-native","jest"],
"allowSyntheticDefaultImports": true,
"esModuleInterop": true

Choose a reason for hiding this comment

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

I am not sure if any one else has ran into some issue when the Typescript compiler.

I believe "skipLibCheck": true, should be added. to avoid this issue: ['types/react-native'] Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'.

@StevenTCramer
Copy link
Author

@DanielRosenwasser I updated the items you requested.
Seems like others want this repo updated as well. Maybe we will need some help from Microsoft?

@StevenTCramer
Copy link
Author

Give the other doc refresh this is no longer applicable. Thanks guys for the work on that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants